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: