Skip to content

Commit aafb4e7

Browse files
authored
fix(feedback): Improve feedback error message (#12647)
Fix error message colour back to red. Also updated the default error message to include information about network issues and ad blockers since ad blockers can result in a type error which has no status code.
1 parent 1092d77 commit aafb4e7

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

packages/feedback/src/core/sendFeedback.test.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,9 @@ describe('sendFeedback', () => {
275275
276276
message: 'mi',
277277
}),
278-
).rejects.toMatch('Unable to send Feedback. Invalid response from server.');
278+
).rejects.toMatch(
279+
'Unable to send Feedback. This could be because of network issues, or because you are using an ad-blocker',
280+
);
279281
});
280282

281283
it('handles 0 transport error', async () => {

packages/feedback/src/core/sendFeedback.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ export const sendFeedback: SendFeedback = (
6363
);
6464
}
6565

66-
return reject('Unable to send Feedback. Invalid response from server.');
66+
return reject(
67+
'Unable to send Feedback. This could be because of network issues, or because you are using an ad-blocker',
68+
);
6769
});
6870
});
6971
};

packages/feedback/src/modal/components/Dialog.css.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ const FORM = `
122122
}
123123
124124
.form__error-container {
125-
color: var(--error-foreground);
126-
fill: var(--error-foreground);
125+
color: var(--error-color);
126+
fill: var(--error-color);
127127
}
128128
129129
.form__label {

0 commit comments

Comments
 (0)