@@ -44,7 +44,7 @@ describe('\n[E2E] <%= namePascal %> 🔍', () => {
4444 })
4545
4646 it('should throw an error when trying to filter by values not authorized in the model <%= nameCamel %>', async () => {
47- const status = 400
47+ const status = 422
4848 const method = 'GET'
4949 const path = `/<%= namePluralCamel %>/507f1f77bcf86cd799439011?*testetwoe=hello`
5050
@@ -55,17 +55,18 @@ describe('\n[E2E] <%= namePascal %> 🔍', () => {
5555 expect(body.method).toBe(method)
5656 expect(body.status).toBe(status)
5757 expect(body.error).toEqual({
58- name: 'REPOSITORY_WHERE_ERROR',
58+ isSecJsException: true,
59+ name: 'UnprocessableEntityException',
5960 message: {
60- error: 'Bad Request ',
61+ error: 'Unprocessable Entity Error ',
6162 message: 'It is not possible to filter by testetwoe',
6263 statusCode: status,
6364 },
6465 })
6566 })
6667
6768 it('should throw an error when trying to include relations not authorized in the model <%= nameCamel %>', async () => {
68- const status = 400
69+ const status = 422
6970 const method = 'GET'
7071 const path = `/<%= namePluralCamel %>/507f1f77bcf86cd799439011?_testetwoe=[]`
7172
@@ -76,9 +77,10 @@ describe('\n[E2E] <%= namePascal %> 🔍', () => {
7677 expect(body.method).toBe(method)
7778 expect(body.status).toBe(status)
7879 expect(body.error).toEqual({
79- name: 'REPOSITORY_RELATION_ERROR',
80+ isSecJsException: true,
81+ name: 'UnprocessableEntityException',
8082 message: {
81- error: 'Bad Request ',
83+ error: 'Unprocessable Entity Error ',
8284 message: 'It is not possible to include testetwoe relation',
8385 statusCode: status,
8486 },
@@ -106,4 +108,3 @@ afterEach(async () => {
106108 await database.truncateCache()
107109 await app.closeApp()
108110})
109-
0 commit comments