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.

CommentFileSizeAuthor
#2 check-more-responses-3394729-2.patch2.72 KBoadaeh

Comments

oadaeh created an issue. See original summary.

oadaeh’s picture

Status: Active » Needs review
StatusFileSize
new2.72 KB

Here's the patch.

daggerhart’s picture

Status: Needs review » Reviewed & tested by the community

Patch applies and looks good. Thanks!

  • oadaeh authored 1cccb8f6 on 8.x-1.x
    Issue #3394729 by oadaeh, daggerhart: Check more responses
    
oadaeh’s picture

Status: Reviewed & tested by the community » Fixed

I created release 8.x-1.0-beta8 that includes the changes for this issue, so I'm marking this fixed.

oadaeh’s picture

Assigned: oadaeh » Unassigned

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.