Skip to content

Commit

Permalink
add not found exception
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaalanMarwan committed Apr 29, 2022
1 parent 9f6cdbe commit 68adcc3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tasks/tasks.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export class TasksService {
getTaskById(id: string): Task {
const task = this.tasks.find((task) => task.id === id);
if (!task) {
throw new NotFoundException();
throw new NotFoundException(`Task with ID ${id} not found`);
}
return task;
}
Expand Down

0 comments on commit 68adcc3

Please sign in to comment.