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

Gracefully handle errors due to invalid oauth codes #382

Merged
merged 1 commit into from
Sep 16, 2021

Conversation

alastair
Copy link
Collaborator

Identified in https://sentry.metabrainz.org/metabrainz/listenbrainz/issues/145812/?environment=production&referrer=alert_email

Although it doesn't happen in a normal successful oauth flow, there are some cases where a manually constructed URL with an invalid code parameter could cause an uncaught exception.

Handle the situation where:

  • the auth code isn't valid on the musicbrainz end, therefore returning an error message
  • the response from musicbrainz isn't valid json

@alastair alastair requested a review from amCap1712 August 31, 2021 16:43
@github-actions

This comment has been minimized.

@alastair alastair merged commit 3918415 into master Sep 16, 2021
@alastair alastair deleted the oauth-error-checks branch September 16, 2021 09:27
@github-actions
Copy link

Unit Test Results

    1 files  ±0      1 suites  ±0   50s ⏱️ ±0s
143 tests ±0  143 ✔️ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 3918415. ± Comparison against base commit 3918415.

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.

1 participant