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 database overloads and return 429 #141

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

MattMcL4475
Copy link
Collaborator

@MattMcL4475 MattMcL4475 commented Mar 20, 2023

When the database is overloaded (timeouts, connection pool exhaustion), this PR uses global middleware exception handling to return 429 (too many requests) to the caller. #228

@MattMcL4475 MattMcL4475 marked this pull request as draft March 20, 2023 23:39
Copy link
Collaborator

@BMurri BMurri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok to me, except I'm starting to get eyestrain, so you may wish to wait for @giventocode to weigh in.

@@ -0,0 +1,42 @@
namespace TesApi.Web
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest moving this file to the Controllers folder, since that's the only context in which this code will ever operate.

Copy link
Contributor

@giventocode giventocode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants