Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle HTTP error responses #42

Merged
merged 1 commit into from Oct 1, 2023
Merged

Handle HTTP error responses #42

merged 1 commit into from Oct 1, 2023

Conversation

Zastai
Copy link
Owner

@Zastai Zastai commented Oct 1, 2023

WebRequest used to throw WebException when an HTTP response had an error status. The library was changed to use HttpClient instead, which does not do that, but the code was not updated to handle error responses.

Error handling has now been re-added, using a new HttpError exception. The XML doc comments were updated accordingly.

In addition, new methods have been added: FetchReleaseIfAvailable and FetchGroupReleaseIfAvailable (plus async versions). These will return null instead of throwing an HttpError when a 404 response is received.

Bumped version to 5.1.0-pre due to the new methods.

Fixes #41.

`WebRequest` used to throw `WebException` when an HTTP response had an
error status. The library was changed to use `HttpClient` instead, which
does not do that, but the code was not updated to handle error
responses.

Error handling has now been re-added, using a new `HttpError` exception.
The XML doc comments were updated accordingly.

In addition, new methods have been added: `FetchReleaseIfAvailable`
and `FetchGroupReleaseIfAvailable` (plus async versions). These will
return `null` instead of throwing an `HttpError` when a 404 response is
received.

Bumped version to 5.1.0-pre due to the new methods.

Fixes #41.
@Zastai Zastai added bug Something isn't working right fix Changes to fix broken behaviour bump-minor-version Changes requiring a bump to the minor version labels Oct 1, 2023
@Zastai Zastai merged commit 430c85b into main Oct 1, 2023
2 checks passed
@Zastai Zastai deleted the issue-41 branch October 1, 2023 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working right bump-minor-version Changes requiring a bump to the minor version fix Changes to fix broken behaviour
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handle "not found" case with a clearer error
1 participant