Check more responses

Created on 17 October 2023, 9 months ago
Updated 20 November 2023, 7 months ago

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.

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States oadaeh

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024