{"action":"created","issue":{"url":"https://api.github.com/repos/opendatakit/collect/issues/2405","repository_url":"https://api.github.com/repos/opendatakit/collect","labels_url":"https://api.github.com/repos/opendatakit/collect/issues/2405/labels{/name}","comments_url":"https://api.github.com/repos/opendatakit/collect/issues/2405/comments","events_url":"https://api.github.com/repos/opendatakit/collect/issues/2405/events","html_url":"https://github.com/opendatakit/collect/pull/2405","id":343737615,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAzMjk5MTgy","number":2405,"title":"Fixed null date issue and stream error handling","user":{"login":"jd-alexander","id":1509205,"node_id":"MDQ6VXNlcjE1MDkyMDU=","avatar_url":"https://avatars1.githubusercontent.com/u/1509205?v=4","gravatar_id":"","url":"https://api.github.com/users/jd-alexander","html_url":"https://github.com/jd-alexander","followers_url":"https://api.github.com/users/jd-alexander/followers","following_url":"https://api.github.com/users/jd-alexander/following{/other_user}","gists_url":"https://api.github.com/users/jd-alexander/gists{/gist_id}","starred_url":"https://api.github.com/users/jd-alexander/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jd-alexander/subscriptions","organizations_url":"https://api.github.com/users/jd-alexander/orgs","repos_url":"https://api.github.com/users/jd-alexander/repos","events_url":"https://api.github.com/users/jd-alexander/events{/privacy}","received_events_url":"https://api.github.com/users/jd-alexander/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-07-23T18:07:43Z","updated_at":"2018-07-23T18:44:18Z","closed_at":null,"author_association":"COLLABORATOR","pull_request":{"url":"https://api.github.com/repos/opendatakit/collect/pulls/2405","html_url":"https://github.com/opendatakit/collect/pull/2405","diff_url":"https://github.com/opendatakit/collect/pull/2405.diff","patch_url":"https://github.com/opendatakit/collect/pull/2405.patch"},"body":"Stream errors weren't being handled so a crash was being caused when an error occurs within the stream so now that is being handled and sent to Crashlytics via the Timber log. The `SmsEvent` now has a default date that can be used by events. Events without the date were causing a crash when the formatter got a null date.\r\n\r\nCloses #2401 \r\n\r\n#### What has been done to verify that this works as intended?\r\nTested the scenario described in the issue on a physical tablet and an emulator. Crash won't be caused in the event anything weird ever happens since the stream handles errors.\r\n\r\n#### Why is this the best possible solution? Were any other approaches considered?\r\nIt's the best solution since the stream being broken by the error was causing the crash so implemented exception handling causes this to not occur.\r\n\r\n#### Are there any risks to merging this code? If so, what are they?\r\nNo.\r\n\r\n#### Do we need any specific form for testing your changes? If so, please attach one.\r\nUse a SMS Test sample form from the server.\r\n\r\n#### Does this change require updates to documentation? If so, please file an issue [here]( https://github.com/opendatakit/docs/issues/new) and include the link below.\r\nN/A\r\n\r\n#### Before submitting this PR, please make sure you have:\r\n- [x] run `./gradlew pmd checkstyle lintDebug spotbugsDebug` and confirmed all checks still pass.\r\n- [x] verified that any code or assets from external sources are properly credited in comments and/or in the [about file](https://github.com/opendatakit/collect/blob/master/collect_app/src/main/assets/open_source_licenses.html).\r\n- [x] verified that any new UI elements use theme colors. [UI Components Style guidelines](https://github.com/opendatakit/collect/blob/master/CONTRIBUTING.md#ui-components-style-guidelines)"},"comment":{"url":"https://api.github.com/repos/opendatakit/collect/issues/comments/407160778","html_url":"https://github.com/opendatakit/collect/pull/2405#issuecomment-407160778","issue_url":"https://api.github.com/repos/opendatakit/collect/issues/2405","id":407160778,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNzE2MDc3OA==","user":{"login":"jd-alexander","id":1509205,"node_id":"MDQ6VXNlcjE1MDkyMDU=","avatar_url":"https://avatars1.githubusercontent.com/u/1509205?v=4","gravatar_id":"","url":"https://api.github.com/users/jd-alexander","html_url":"https://github.com/jd-alexander","followers_url":"https://api.github.com/users/jd-alexander/followers","following_url":"https://api.github.com/users/jd-alexander/following{/other_user}","gists_url":"https://api.github.com/users/jd-alexander/gists{/gist_id}","starred_url":"https://api.github.com/users/jd-alexander/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jd-alexander/subscriptions","organizations_url":"https://api.github.com/users/jd-alexander/orgs","repos_url":"https://api.github.com/users/jd-alexander/repos","events_url":"https://api.github.com/users/jd-alexander/events{/privacy}","received_events_url":"https://api.github.com/users/jd-alexander/received_events","type":"User","site_admin":false},"created_at":"2018-07-23T18:44:18Z","updated_at":"2018-07-23T18:44:18Z","author_association":"COLLABORATOR","body":"Just double checked and saw that if an error occurs it's returning an empty string for the subtext. What I will do is rework that to catch this exception as well. "}}
{"actor":{"display_login":"jd-alexander"}}