fix(api): use generic error handler with Sentry (#55176)

This commit is contained in:
Oliver Eyton-Williams
2024-06-13 19:18:16 +02:00
committed by GitHub
parent 6cfea56f12
commit 14df93bcef
5 changed files with 21 additions and 7 deletions
@@ -749,7 +749,7 @@
"flash": {
"honest-first": "To claim a certification, you must first agree to our academic honesty policy",
"really-weird": "Something really weird happened, if it happens again, please consider raising an issue on https://github.com/freeCodeCamp/freeCodeCamp/issues/new",
"not-right": "Something is not quite right. A report has been generated and the freeCodeCamp.org team have been notified",
"generic-error": "Something went wrong. Please try again in a moment or contact support@freecodecamp.org if the error persists.",
"went-wrong": "Something went wrong, please check and try again",
"account-deleted": "Your account has been successfully deleted",
"progress-reset": "Your progress has been reset",
@@ -39,7 +39,7 @@ export enum FlashMessages {
None = '',
NotEligible = 'flash.not-eligible',
NotHonest = 'flash.not-honest',
NotRight = 'flash.not-right',
GenericError = 'flash.generic-error',
ProfilePrivate = 'flash.profile-private',
ProgressReset = 'flash.progress-reset',
ProvideUsername = 'flash.provide-username',
+1 -1
View File
@@ -12,7 +12,7 @@ export const reallyWeirdErrorMessage = {
export const reportedErrorMessage = {
type: 'danger',
message: FlashMessages.NotRight
message: FlashMessages.GenericError
};
export const certificateMissingErrorMessage = {
+1 -1
View File
@@ -54,7 +54,7 @@ const toneUrls = {
// [FlashMessages.None]: '',
[FlashMessages.NotEligible]: TRY_AGAIN,
[FlashMessages.NotHonest]: TRY_AGAIN,
[FlashMessages.NotRight]: TRY_AGAIN,
[FlashMessages.GenericError]: TRY_AGAIN,
[FlashMessages.ProfilePrivate]: TRY_AGAIN,
[FlashMessages.ProgressReset]: TRY_AGAIN,
[FlashMessages.ProvideUsername]: TRY_AGAIN,