Skip to content

Commit

Permalink
error message refactored
Browse files Browse the repository at this point in the history
  • Loading branch information
OgunyemiO committed Nov 20, 2023
1 parent 9abf665 commit d143be7
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hmcts/ccd-case-ui-toolkit",
"version": "6.19.13",
"version": "6.19.14-server-error-message",
"engines": {
"yarn": "^3.5.0",
"npm": "^8.10.0"
Expand Down
2 changes: 1 addition & 1 deletion projects/ccd-case-ui-toolkit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hmcts/ccd-case-ui-toolkit",
"version": "6.19.13",
"version": "6.19.14-server-error-message",
"engines": {
"yarn": "^3.5.0",
"npm": "^8.10.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,10 @@ export class WriteDocumentFieldComponent extends AbstractFieldWriteComponent imp
if (0 === error.status || 502 === error.status) {
return WriteDocumentFieldComponent.UPLOAD_ERROR_NOT_AVAILABLE;
}
if (error.error.includes('422 Unprocessable Entity')) {
const errorMsg = error.error.substring(116, 159);
return errorMsg
}
return error.error;
}

Expand Down
Loading

0 comments on commit d143be7

Please sign in to comment.