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

Improve the gateway test suite for mapped errors #365

Open
halkyon opened this issue Sep 28, 2023 · 0 comments
Open

Improve the gateway test suite for mapped errors #365

halkyon opened this issue Sep 28, 2023 · 0 comments
Labels

Comments

@halkyon
Copy link
Contributor

halkyon commented Sep 28, 2023

Goal

We want to be sure that the right HTTP status is returned to the user if there's an error, not just a default 500 server error. If a client sees the wrong error like a 500, it will sometimes attempt a retry, which means unnecessary load and wasted retries.

If we bump uplink sometimes the errors mappings can change, e.g. when we enabled upload codepath refactor, there were cases where the wrong HTTP status was returned. There are also cases we don't catch on dev and test until someone exceeds their rate limit and we notice the wrong status is returned to them.

We need to improve the test suite so we can catch those earlier instead of when it hits production on real traffic.

Acceptance Criteria

  • All (or as many as possible) error mappings are tested against all the object API endpoints to make sure we're going to return the right thing.
  • Certain conditions like bandwidth limit exceeded are simulated to test limiting errors return 429 status on all the different endpoints.

Notes

  • Integration test likely makes the most sense, that's going to be closer to what the end client will see, and will test the entire API endpoint instead of just testing our object API backend.
  • Maybe there's a way to reduce the amount of tests we have to write by creating a Cartesian product of all the endpoints that should be mapped to the mapped errors.
@halkyon halkyon changed the title Improve the test suite for mapped errors Improve the gateway test suite for mapped errors Sep 28, 2023
@halkyon halkyon added the testing testing and/or QA label Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants