mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-01-23 09:20:58 +00:00
UsersService: Improve logging in getNoteByIdOrAlias
Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
15db6a9b2a
commit
558addf83e
1 changed files with 5 additions and 0 deletions
|
@ -154,10 +154,15 @@ export class NotesService {
|
|||
],
|
||||
});
|
||||
if (note === undefined) {
|
||||
this.logger.debug(
|
||||
`Could not find note '${noteIdOrAlias}'`,
|
||||
'getNoteByIdOrAlias',
|
||||
);
|
||||
throw new NotInDBError(
|
||||
`Note with id/alias '${noteIdOrAlias}' not found.`,
|
||||
);
|
||||
}
|
||||
this.logger.debug(`Found note '${noteIdOrAlias}'`, 'getNoteByIdOrAlias');
|
||||
return note;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue