Skip to content

Commit

Permalink
fix(errors): add messaging for 429 reponse [KHCP-12150] (#1516)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdehaven authored Jun 3, 2024
1 parent 810b103 commit 60eea10
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/ErrorMessage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ const setGeneralErrorMessage = (): void => {
errorMessage.value = messages.general.invalidAccessCode
} else if (status === 503) {
errorMessage.value = messages.general.serviceUnavailable
} else if (status === 409) {
errorMessage.value = messages.general.rateLimited
} else if (data && data.invalid_parameters && data.invalid_parameters?.length) {
const { field, reason } = data.invalid_parameters[0]
// v2 API error response
Expand Down
1 change: 1 addition & 0 deletions src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"missingInfo": "Please complete all required fields.",
"invalidAccessCode": "Invalid access code",
"serviceUnavailable": "Service unavailable. Please try again later.",
"rateLimited": "Too many attempts. Please wait and try again shortly.",
"dividerTextOr": "or",
"recaptchaError": "We could not verify that you're human. Refresh the page to try again."
},
Expand Down

0 comments on commit 60eea10

Please sign in to comment.