diff --git a/e2e/node/error.test.ts b/e2e/node/error.test.ts index d434e86..e75e0e1 100644 --- a/e2e/node/error.test.ts +++ b/e2e/node/error.test.ts @@ -86,6 +86,7 @@ describe(`End-to-end error description test for ${ENV.environment}`, () => { "Some error message", ); expect(error).toBeInstanceOf(UnauthorizedError); + expect(error.message).toBe("Some error message"); expect(error.problemDetails.status).toBe(401); expect(error.problemDetails.title).toBe("Unauthorized"); expect(error.problemDetails.detail).toBeDefined(); @@ -104,6 +105,7 @@ describe(`End-to-end error description test for ${ENV.environment}`, () => { "Some error message", ); expect(error).toBeInstanceOf(NotFoundError); + expect(error.message).toBe("Some error message"); expect(error.problemDetails.status).toBe(404); expect(error.problemDetails.title).toBe("Not Found"); expect(error.problemDetails.detail).toBeDefined(); @@ -124,6 +126,7 @@ describe(`End-to-end error description test for ${ENV.environment}`, () => { "Some error message", ); expect(error).toBeInstanceOf(NotAcceptableError); + expect(error.message).toBe("Some error message"); expect(error.problemDetails.status).toBe(406); expect(error.problemDetails.title).toBe("Not Acceptable"); expect(error.problemDetails.detail).toBeDefined(); @@ -149,6 +152,7 @@ describe(`End-to-end error description test for ${ENV.environment}`, () => { "Some error message", ); expect(error).toBeInstanceOf(BadRequestError); + expect(error.message).toBe("Some error message"); expect(error.problemDetails.status).toBe(400); expect(error.problemDetails.title).toBe("Bad Request"); expect(error.problemDetails.detail).toBeDefined(); @@ -167,6 +171,7 @@ describe(`End-to-end error description test for ${ENV.environment}`, () => { "Some error message", ); expect(error).toBeInstanceOf(ForbiddenError); + expect(error.message).toBe("Some error message"); expect(error.problemDetails.status).toBe(403); expect(error.problemDetails.title).toBe("Forbidden"); expect(error.problemDetails.detail).toBeDefined();