Problem/Motivation
When connecting to the OneHub API, only HTTP three codes are checked, and if some other code is returned, the local file data is deleted, even when the code might be 5xx, indicating a problem with the server.
Also, In going through this, I found a method was being called that had had its name changed at some point in the past, so that was fixed.
Steps to reproduce
Try to update your files when the OneHub API sever is unavailable.
Proposed resolution
Don't assume anything other than 200, 201, and 401 should cause the local file data to be deleted. Only delete it for 404 codes.
For this, I changed the code on only return NULL when the HTTP response is 404. For all other codes, a string is returned, and that string is effectively ignored by the calling code.
Remaining tasks
- Code review
- QA
- Merge
User interface changes
None.
API changes
None.
Data model changes
None.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | check-more-responses-3394729-2.patch | 2.72 KB | oadaeh |
Comments
Comment #2
oadaeh commentedHere's the patch.
Comment #3
daggerhart commentedPatch applies and looks good. Thanks!
Comment #5
oadaeh commentedI created release 8.x-1.0-beta8 that includes the changes for this issue, so I'm marking this fixed.
Comment #6
oadaeh commented