mirror of
https://github.com/ushahidi/SMSSync.git
synced 2026-04-25 15:55:57 +03:00
[GH-ISSUE #453] Empty response to task checker makes the app crash #318
Labels
No labels
Bug report
Code improvement
Concern
Feature request
Feature request
Good first issue to work on
In progress
Needs info
Question
Ready
Translation
User Experience
User Experience
Website
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/SMSSync#318
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @vanso-hubsi on GitHub (Jun 29, 2016).
Original GitHub issue: https://github.com/ushahidi/SMSSync/issues/453
Expected behavior
SMSSync not to crash
Actual behavior
SMSSync crashes, when it receives an empty response for the task checking request.
Steps to reproduce the behavior
Enable task checker, let server return an empty response
Notes
It seems the bug is here: PostMessage.java#L378
When the response is empty, the method
messageHttpClient.getResponse().body()throws an exception sincegetResponse()returns null. This exception is first catched on Line 371, but when the catch block wants to log the error, it does thegetResponse().body()call again. That time, only IOExceptions get catched, which doesn't apply and thus makes the app crash.