refactor: getNoteByIdOrAlias throws NotInDBError instead of ForbiddenIdError for an id on the forbidden list

It's not really necessary to tell the user via get that this id is forbidden, it will not be there and as such NotInDBError is the correct message to the user

Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
Philip Molares 2022-01-17 08:56:43 +01:00
parent 4500caf882
commit 451dedef15
2 changed files with 9 additions and 3 deletions

View file

@ -321,7 +321,7 @@ describe('NotesService', () => {
it('id is forbidden', async () => {
await expect(
service.getNoteByIdOrAlias(forbiddenNoteId),
).rejects.toThrow(ForbiddenIdError);
).rejects.toThrow(NotInDBError);
});
});
});