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

Unify httpStatus field on ApiRequestException subclasses #1188

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

gnprice
Copy link
Member

@gnprice gnprice commented Dec 20, 2024

Like #1187, this is a follow-up to #1063. It's a thought I had while working on those changes, but didn't pursue then because the PR was long and complex enough already.

Commit messages

ab291ad api [nfc]: Reorder NetworkException to before sibling classes

We're about to group the others together under a new sibling of
this class, so it'll be cleanest if this one doesn't appear in the
midst of the others.

bdd625d api [nfc]: Add HttpException as base-class home for httpStatus field

2eea635 store [nfc]: Use HttpException to simplify error cases

This expresses more directly what we really mean here: if the
response had either the HTTP status code or the Zulip API error code
that mean a rate-limit error, treat it as a rate-limit error.

We're about to group the others together under a new sibling of
this class, so it'll be cleanest if this one doesn't appear in the
midst of the others.
This expresses more directly what we really mean here: if the
response had either the HTTP status code or the Zulip API error code
that mean a rate-limit error, treat it as a rate-limit error.
@gnprice gnprice added the maintainer review PR ready for review by Zulip maintainers label Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintainer review PR ready for review by Zulip maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant