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

feat(ui): Throw error on non-json api responses #58129

Merged
merged 4 commits into from
Oct 16, 2023
Merged

Conversation

scttcper
Copy link
Member

Blocks 200 responses with html instead of json from causing errors further down the stack.

Attempt number 2 for #57634 after we reverted because some attachements and apple crash reports.

Changes from the last attempt:

  • Uses the "Accept" header to determine when we're expecting a json response
  • Sets the Accept header for attachments and apple-crash-report endpoints

will keep an eye on this issue after merge https://sentry.sentry.io/issues/4190204443/events/

@scttcper scttcper requested a review from a team October 13, 2023 23:43
@scttcper scttcper changed the title Revert "Revert "feat(ui): Throw error on non-json api responses (#57634… feat(ui): Throw error on non-json api responses Oct 13, 2023
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Oct 13, 2023
Copy link
Member

@malwilley malwilley left a comment

Choose a reason for hiding this comment

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

Testing locally I get this response from the apple-crash-report endpoint 😞

Could not satisfy the request Accept header.

@scttcper scttcper merged commit 06597ee into master Oct 16, 2023
42 checks passed
@scttcper scttcper deleted the scttcper/html-throw branch October 16, 2023 20:17
@github-actions github-actions bot locked and limited conversation to collaborators Nov 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants