Skip to content

Commit

Permalink
feat(feedback): Improve error message for 403 errors (#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 #9856
  • Loading branch information
c298lee authored Aug 26, 2024
1 parent b47de74 commit e6861cf
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 e6861cf

Please sign in to comment.