Skip to content

Commit

Permalink
fix(certificate): error message (#172)
Browse files Browse the repository at this point in the history
  • Loading branch information
nidhigarg-bmw authored Aug 3, 2023
1 parent f876ecc commit 666a0d6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/assets/locales/de/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -1536,7 +1536,7 @@
"uploadDocumentTitle": "Please upload your certificate proof:",
"note": "Please upload only pdf files with maximum 1 MB.",
"descriptionLabel": "Description for verification",
"error": "Something went wrong!",
"error": "Something went wrong. ",
"success": "Certificate uploaded successfully."
},
"successCertificate": {
Expand Down
2 changes: 1 addition & 1 deletion src/assets/locales/en/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -1475,7 +1475,7 @@
"uploadDocumentTitle": "Please upload your certificate proof:",
"note": "Please upload only pdf files with maximum 1 MB.",
"descriptionLabel": "Description for verification",
"error": "Something went wrong!",
"error": "Something went wrong. ",
"success": "Certificate uploaded successfully."
},
"successCertificate": {
Expand Down
9 changes: 7 additions & 2 deletions src/components/overlays/UpdateCertificate/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,14 @@ export default function UpdateCertificate({ id }: { id: string }) {
await addCertificate(data).unwrap()
setSubmitClicked(true)
}
} catch (err) {
} catch (err: unknown) {
setLoading(false)
error(t('content.certificates.updateCertificate.error'), '', '')
error(
t('content.certificates.updateCertificate.error') +
err.data.errors.unknown[0],
'',
''
)
}
}

Expand Down

0 comments on commit 666a0d6

Please sign in to comment.