From 8c8fa4dc6b275edae6e382e2872e0c4bbe7f1b9b Mon Sep 17 00:00:00 2001 From: "saito.k" Date: Thu, 13 Jul 2023 16:50:47 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=A8=E3=83=A9=E3=83=BC=E3=81=AE=E3=82=B9?= =?UTF-8?q?=E3=83=86=E3=83=BC=E3=82=BF=E3=82=B9=E3=82=B3=E3=83=BC=E3=83=89?= =?UTF-8?q?=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/features/tasks/tasks.service.spec.ts | 6 +++--- dictation_server/src/features/tasks/tasks.service.ts | 10 +++++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/dictation_server/src/features/tasks/tasks.service.spec.ts b/dictation_server/src/features/tasks/tasks.service.spec.ts index 5b19496..54271c0 100644 --- a/dictation_server/src/features/tasks/tasks.service.spec.ts +++ b/dictation_server/src/features/tasks/tasks.service.spec.ts @@ -1594,7 +1594,7 @@ describe('checkin', () => { const service = module.get(TasksService); await expect(service.checkin(1, 'typist-user-external-id')).rejects.toEqual( - new HttpException(makeErrorResponse('E010603'), HttpStatus.BAD_REQUEST), + new HttpException(makeErrorResponse('E010603'), HttpStatus.NOT_FOUND), ); }); }); @@ -1741,7 +1741,7 @@ describe('suspend', () => { const service = module.get(TasksService); await expect(service.checkin(1, 'typist-user-external-id')).rejects.toEqual( - new HttpException(makeErrorResponse('E010603'), HttpStatus.BAD_REQUEST), + new HttpException(makeErrorResponse('E010603'), HttpStatus.NOT_FOUND), ); }); }); @@ -2020,7 +2020,7 @@ describe('cancel', () => { await expect( service.cancel(1, 'typist-user-external-id', ['typist', 'standard']), ).rejects.toEqual( - new HttpException(makeErrorResponse('E010603'), HttpStatus.BAD_REQUEST), + new HttpException(makeErrorResponse('E010603'), HttpStatus.NOT_FOUND), ); }); }); diff --git a/dictation_server/src/features/tasks/tasks.service.ts b/dictation_server/src/features/tasks/tasks.service.ts index 24be74e..5584860 100644 --- a/dictation_server/src/features/tasks/tasks.service.ts +++ b/dictation_server/src/features/tasks/tasks.service.ts @@ -184,6 +184,10 @@ export class TasksService { HttpStatus.BAD_REQUEST, ); case TasksNotFoundError: + throw new HttpException( + makeErrorResponse('E010601'), + HttpStatus.NOT_FOUND, + ); case AccountNotMatchError: case StatusNotMatchError: throw new HttpException( @@ -228,7 +232,7 @@ export class TasksService { case TasksNotFoundError: throw new HttpException( makeErrorResponse('E010603'), - HttpStatus.BAD_REQUEST, + HttpStatus.NOT_FOUND, ); case StatusNotMatchError: case TypistUserNotMatchError: @@ -279,7 +283,7 @@ export class TasksService { case TasksNotFoundError: throw new HttpException( makeErrorResponse('E010603'), - HttpStatus.BAD_REQUEST, + HttpStatus.NOT_FOUND, ); case StatusNotMatchError: case TypistUserNotMatchError: @@ -325,7 +329,7 @@ export class TasksService { case TasksNotFoundError: throw new HttpException( makeErrorResponse('E010603'), - HttpStatus.BAD_REQUEST, + HttpStatus.NOT_FOUND, ); case StatusNotMatchError: case TypistUserNotMatchError: