Skip to content

Commit 5d44710

Browse files
fix: add id key value pair to error object in add-a-trust, admin/login, admin/trusts/edit, trust-admin/hospitals/add - required for ErrorSummary
1 parent 65f94eb commit 5d44710

File tree

5 files changed

+5
-0
lines changed

5 files changed

+5
-0
lines changed

pages/admin/add-a-trust.js

+1
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ const AddATrust = () => {
145145
setAdminCodeUniqueError(onSubmitErrors, err);
146146
} else {
147147
onSubmitErrors.push({
148+
id: "generic-error",
148149
message: "Something went wrong, please try again later.",
149150
});
150151
setErrors(onSubmitErrors);

pages/admin/login.js

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ const Login = ({ correlationId }) => {
6060
return true;
6161
} else {
6262
onSubmitErrors.push({
63+
id: "code-or-password-error",
6364
message: "The code or password you entered was not recognised",
6465
});
6566
}

pages/admin/trusts/[id]/edit.js

+1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ const EditTrust = ({ trust }) => {
6262
return true;
6363
} else {
6464
onSubmitErrors.push({
65+
id: "generic-error",
6566
message: "Something went wrong, please try again later.",
6667
});
6768
setErrors(onSubmitErrors);

pages/trust-admin/hospitals/add.js

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const AddAHospital = ({ error, trustId }) => {
2424

2525
const getGenericError = () => {
2626
return {
27+
id: 'generic-error',
2728
message: "Something went wrong, please try again later.",
2829
};
2930
};

pages/trust-admin/login.js

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ const Login = ({ correlationId }) => {
6060
return true;
6161
} else {
6262
onSubmitErrors.push({
63+
id: "code-or-password-error",
6364
message: "The code or password you entered was not recognised",
6465
});
6566
}

0 commit comments

Comments
 (0)