Skip to content

fake_api: Prepare API exceptions conveniently, distinct from HTTP exceptions #1359

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 4 commits into from
Feb 19, 2025

Conversation

gnprice
Copy link
Member

@gnprice gnprice commented Feb 16, 2025

Stacked atop #1355. Prompted by this review thread (thanks @chrisbobbe for the observation):
#1355 (comment)

Commit messages

a933232 fake_api [nfc]: Clarify prepared exception is at HTTP layer

And leave a couple of TODO comments in the one test file that was
accidentally preparing exceptions here that won't turn out in the
intended way. The next commit will provide a clean way for these
tests to do what they intend instead.

314ce48 fake_api: Add apiException parameter; switch to it where needed

4fa79bb fake_api [nfc]: Check for confusion in httpException use

2ed83f3 test [nfc]: Introduce eg.apiBadRequest

This changes the message string in a few of the call sites, where
the string was already an arbitrary one rather than a realistic
specific string. That's still NFC because the tests weren't
depending on the specific string.

@gnprice gnprice added the maintainer review PR ready for review by Zulip maintainers label Feb 16, 2025
@gnprice gnprice requested a review from chrisbobbe February 16, 2025 01:46
And leave a couple of TODO comments in the one test file that was
accidentally preparing exceptions here that won't turn out in the
intended way.  The next commit will provide a clean way for these
tests to do what they intend instead.
This changes the message string in a few of the call sites, where
the string was already an arbitrary one rather than a realistic
specific string.  That's still NFC because the tests weren't
depending on the specific string.
@chrisbobbe chrisbobbe force-pushed the pr-fake-api-exception branch from 2ed83f3 to f43d2e0 Compare February 19, 2025 00:38
@chrisbobbe chrisbobbe merged commit f43d2e0 into zulip:main Feb 19, 2025
1 check passed
@chrisbobbe
Copy link
Collaborator

Thanks! LGTM, merged.

@gnprice gnprice deleted the pr-fake-api-exception branch February 19, 2025 03:19
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.

2 participants