mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-13 22:54:42 -04:00
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:
parent
4500caf882
commit
451dedef15
2 changed files with 9 additions and 3 deletions
|
@ -321,7 +321,7 @@ describe('NotesService', () => {
|
|||
it('id is forbidden', async () => {
|
||||
await expect(
|
||||
service.getNoteByIdOrAlias(forbiddenNoteId),
|
||||
).rejects.toThrow(ForbiddenIdError);
|
||||
).rejects.toThrow(NotInDBError);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue