Skip to content

Commit

Permalink
feat(feedback): Improve error message for 403 errors (getsentry#13441)
Browse files Browse the repository at this point in the history
If the domain is not in `Allowed Domains` in the Sentry project
settings, it would cause a 403 error. The default setting is `*` so this
only occurs when the user changes these settings.

Fixes getsentry#9856
  • Loading branch information
c298lee authored and Zen-cronic committed Aug 26, 2024
1 parent 0d3d2a1 commit fba8cc7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/feedback/src/core/sendFeedback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ export const sendFeedback: SendFeedback = (
);
}

if (response && typeof response.statusCode === 'number' && response.statusCode === 403) {
return reject(
'Unable to send Feedback. This could be because this domain is not in your list of allowed domains.',
);
}

return reject(
'Unable to send Feedback. This could be because of network issues, or because you are using an ad-blocker',
);
Expand Down

0 comments on commit fba8cc7

Please sign in to comment.