From afeb829ed1c03f6f26fde16ed6059d7ed0e3c00b Mon Sep 17 00:00:00 2001 From: Catherine Lee <55311782+c298lee@users.noreply.github.com> Date: Tue, 20 Aug 2024 11:57:15 -0400 Subject: [PATCH 1/2] 403 error message --- packages/feedback/src/core/sendFeedback.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/feedback/src/core/sendFeedback.ts b/packages/feedback/src/core/sendFeedback.ts index ca9875284c6e..2f3228347096 100644 --- a/packages/feedback/src/core/sendFeedback.ts +++ b/packages/feedback/src/core/sendFeedback.ts @@ -64,6 +64,18 @@ export const sendFeedback: SendFeedback = ( ); } + if (response && typeof response.statusCode === 'number' && response.statusCode === 0) { + return reject( + 'Unable to send Feedback. This is because of network issues, or because you are using an ad-blocker.', + ); + } + + 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', ); From e6f3896ff1fde4bd8002bff155fba4a2a373615f Mon Sep 17 00:00:00 2001 From: Catherine Lee <55311782+c298lee@users.noreply.github.com> Date: Tue, 20 Aug 2024 12:01:02 -0400 Subject: [PATCH 2/2] remove copied code --- packages/feedback/src/core/sendFeedback.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/packages/feedback/src/core/sendFeedback.ts b/packages/feedback/src/core/sendFeedback.ts index 2f3228347096..c0b8ccaa2704 100644 --- a/packages/feedback/src/core/sendFeedback.ts +++ b/packages/feedback/src/core/sendFeedback.ts @@ -64,12 +64,6 @@ export const sendFeedback: SendFeedback = ( ); } - if (response && typeof response.statusCode === 'number' && response.statusCode === 0) { - return reject( - 'Unable to send Feedback. This is because of network issues, or because you are using an ad-blocker.', - ); - } - 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.',