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

fix(feedback): Improve feedback error message #12647

Merged
merged 2 commits into from
Jun 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/feedback/src/core/sendFeedback.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,9 @@ describe('sendFeedback', () => {
email: 're@example.org',
message: 'mi',
}),
).rejects.toMatch('Unable to send Feedback. Invalid response from server.');
).rejects.toMatch(
'Unable to send Feedback. This could be because of network issues, or because you are using an ad-blocker',
);
});

it('handles 0 transport error', async () => {
Expand Down
4 changes: 3 additions & 1 deletion packages/feedback/src/core/sendFeedback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ export const sendFeedback: SendFeedback = (
);
}

return reject('Unable to send Feedback. Invalid response from server.');
return reject(
'Unable to send Feedback. This could be because of network issues, or because you are using an ad-blocker',
);
});
});
};
Expand Down
4 changes: 2 additions & 2 deletions packages/feedback/src/modal/components/Dialog.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ const FORM = `
}

.form__error-container {
color: var(--error-foreground);
fill: var(--error-foreground);
color: var(--error-color);
fill: var(--error-color);
}

.form__label {
Expand Down
Loading