-
Notifications
You must be signed in to change notification settings - Fork 9
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
Feat: server error - 400 errors / other exceptions during /token #2117
Merged
Conversation
This file contains 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
github-actions
bot
added
back-end
Django views, sessions, middleware, models, migrations etc.
tests
Related to automated testing (unit, UI, integration, etc.)
labels
May 22, 2024
angela-tran
force-pushed
the
chore/system-enrollment-error--400-token
branch
from
May 22, 2024 16:24
c184b6c
to
746f322
Compare
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
angela-tran
changed the title
Feat: system enrollment error - 400 errors or other exceptions during /token
Feat: system enrollment error - 400 errors / other exceptions during /token
May 22, 2024
angela-tran
changed the title
Feat: system enrollment error - 400 errors / other exceptions during /token
Feat: server error - 400 errors / other exceptions during /token
May 22, 2024
a misconfigured API URL could cause an error to be raised there
13 tasks
thekaveman
reviewed
May 23, 2024
thekaveman
requested changes
Jun 3, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very minor request, otherwise this looks good!
thekaveman
approved these changes
Jun 3, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
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.
Part of #2032
HTTPError
exception during/token
returns a JSON response that is used to send user to/error
/error
shows server error templatefailed access token request
)Reviewing / testing
To test handling of 400-level HTTP errors, you'll have to force it like in other PRs such as #2089.
To
/token
, add:To test other exceptions:
client_id
onPaymentProcessor
causesUnsupportedTokenTypeError
onclient.request_card_tokenization_access
api_base_url
onPaymentProcessor
causes aConnectionError
onclient.ensure_active_token
client_secret_name
onPaymentProcessor
could cause an error when creatingClient
(we read frompayment_processor.client_secret_name
)