Skip to content

Commit 5a1b6f9

Browse files
committed
🔈 delegate 404 HTTP Errors correctly
1 parent 10500f9 commit 5a1b6f9

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/models/integration-error.model.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export enum IntegrationErrorType {
77
INTEGRATION_ERROR_UNAVAILABLE = "integration/error/unavailable",
88

99
ENTITY_ERROR_CONFLICT = "entity/error/conflict",
10+
ENTITY_NOT_FOUND = "entity/not-found",
1011

1112
CONTACT_CREATE_ERROR_CONFLICT = "contact/create-error/conflict",
1213
CONTACT_CREATE_ERROR_EMAIL_CONFLICT = "contact/create-error/email-conflict",

src/util/error.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ export const throwAndDelegateError = (
3434
case 403:
3535
errorType = IntegrationErrorType.INTEGRATION_ERROR_FORBIDDEN;
3636
break;
37+
case 404:
38+
errorType = IntegrationErrorType.ENTITY_NOT_FOUND;
39+
break;
3740
case 409:
3841
errorType = IntegrationErrorType.ENTITY_ERROR_CONFLICT;
3942
break;

0 commit comments

Comments
 (0)