Skip to content

Commit 72d06a4

Browse files
committed
rename NOTIFY_LETTER_NOT_FOUND to NOTIFY_NOT_FOUND
1 parent 3a701c2 commit 72d06a4

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

lambdas/api-handler/src/contracts/errors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export interface ApiError {
1212
export enum ApiErrorCode {
1313
InternalServerError = "NOTIFY_INTERNAL_SERVER_ERROR",
1414
InvalidRequest = "NOTIFY_INVALID_REQUEST",
15-
NotFound = "NOTIFY_LETTER_NOT_FOUND",
15+
NotFound = "NOTIFY_NOT_FOUND",
1616
}
1717

1818
export enum ApiErrorTitle {

lambdas/api-handler/src/mappers/__tests__/error-mapper.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ describe("processError", () => {
4646
expect(JSON.parse(res.body)).toEqual({
4747
errors: [
4848
{
49-
code: "NOTIFY_LETTER_NOT_FOUND",
49+
code: "NOTIFY_NOT_FOUND",
5050
detail: "No resource found with that ID",
5151
id: expect.any(String),
5252
links: {

sandbox/api/openapi.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1455,7 +1455,7 @@ components:
14551455
enum:
14561456
- NOTIFY_INTERNAL_SERVER_ERROR
14571457
- NOTIFY_INVALID_REQUEST
1458-
- NOTIFY_LETTER_NOT_FOUND
1458+
- NOTIFY_NOT_FOUND
14591459
type: string
14601460
links:
14611461
$ref: "#/components/schemas/listLetters_400_response_errors_inner_links"

tests/helpers/common-types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export function error404ResponseBody(): ErrorMessageBody {
3434
errors: [
3535
{
3636
id: "12345",
37-
code: "NOTIFY_LETTER_NOT_FOUND",
37+
code: "NOTIFY_NOT_FOUND",
3838
links: {
3939
about:
4040
"https://digital.nhs.uk/developer/api-catalogue/nhs-notify-supplier",

0 commit comments

Comments
 (0)