Skip to content

Unify httpStatus field on ApiRequestException subclasses #1188

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

Merged
merged 3 commits into from
Jan 15, 2025

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.

@gnprice gnprice added the maintainer review PR ready for review by Zulip maintainers label Dec 20, 2024
@chrisbobbe
Copy link
Collaborator

LGTM, thanks! There's a conflict but I think it's just an indentation thing; please merge at will after resolving that.

@chrisbobbe chrisbobbe added the integration review Added by maintainers when PR may be ready for integration label Jan 11, 2025
@chrisbobbe chrisbobbe removed the maintainer review PR ready for review by Zulip maintainers label Jan 11, 2025
@chrisbobbe chrisbobbe removed their assignment Jan 11, 2025
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 merged commit 531af69 into zulip:main Jan 15, 2025
1 check passed
@gnprice
Copy link
Member Author

gnprice commented Jan 15, 2025

Thanks! Done.

Yeah, #1187 moved some of the same code this edits, and made it a few levels less deeply indented.

@gnprice gnprice deleted the pr-http-exception branch January 15, 2025 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration review Added by maintainers when PR may be ready for integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants