Add test case for timeout in API endpoint infrastructure#71
Merged
Conversation
Follows up #63 with one more test case that checks to make sure the right thing happens if a timeout occurs. (The API endpoint executor adds a five seconds timeout to every run by default.)
bgentry
approved these changes
Jun 28, 2024
brandur
added a commit
that referenced
this pull request
Jun 28, 2024
A partial fix for #73. Instead of always returning an internal error on problems like insufficient privileges, instead return a user-facing API error with a description of what's wrong. This is only a partial fix because it requires the new API infrastructure from #71 to work properly, so we'll need to convert the rest of the endpoints over for it to be fully effective.
brandur
added a commit
that referenced
this pull request
Jun 28, 2024
A partial fix for #73. Instead of always returning an internal error on problems like insufficient privileges, instead return a user-facing API error with a description of what's wrong. This is only a partial fix because it requires the new API infrastructure from #71 to work properly, so we'll need to convert the rest of the endpoints over for it to be fully effective. One possibility is that we might want to just take any kind of `*pgconn.PgError` and change that to a user-facing error. I didn't do that here, but it strikes me as fairly plausible. I figure we should maybe wait for one more type of error that's commonly encountered before taking this step.
brandur
added a commit
that referenced
this pull request
Jun 28, 2024
A partial fix for #73. Instead of always returning an internal error on problems like insufficient privileges, instead return a user-facing API error with a description of what's wrong. This is only a partial fix because it requires the new API infrastructure from #71 to work properly, so we'll need to convert the rest of the endpoints over for it to be fully effective. One possibility is that we might want to just take any kind of `*pgconn.PgError` and change that to a user-facing error. I didn't do that here, but it strikes me as fairly plausible. I figure we should maybe wait for one more type of error that's commonly encountered before taking this step.
brandur
added a commit
that referenced
this pull request
Jun 28, 2024
A partial fix for #73. Instead of always returning an internal error on problems like insufficient privileges, instead return a user-facing API error with a description of what's wrong. This is only a partial fix because it requires the new API infrastructure from #71 to work properly, so we'll need to convert the rest of the endpoints over for it to be fully effective. One possibility is that we might want to just take any kind of `*pgconn.PgError` and change that to a user-facing error. I didn't do that here, but it strikes me as fairly plausible. I figure we should maybe wait for one more type of error that's commonly encountered before taking this step.
brandur
added a commit
that referenced
this pull request
Jun 29, 2024
A partial fix for #73. Instead of always returning an internal error on problems like insufficient privileges, instead return a user-facing API error with a description of what's wrong. This is only a partial fix because it requires the new API infrastructure from #71 to work properly, so we'll need to convert the rest of the endpoints over for it to be fully effective. One possibility is that we might want to just take any kind of `*pgconn.PgError` and change that to a user-facing error. I didn't do that here, but it strikes me as fairly plausible. I figure we should maybe wait for one more type of error that's commonly encountered before taking this step.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follows up #63 with one more test case that checks to make sure the
right thing happens if a timeout occurs. (The API endpoint executor adds
a five seconds timeout to every run by default.)