From 5f13c34a0705bf7ebcffb6e6c706ef1c5d521db7 Mon Sep 17 00:00:00 2001 From: David Mehren Date: Sat, 24 Oct 2020 11:34:16 +0200 Subject: [PATCH] UsersService: Improve logging in `getNoteByIdOrAlias` Signed-off-by: David Mehren --- src/notes/notes.service.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/notes/notes.service.ts b/src/notes/notes.service.ts index f6d5e4994..b31d5c05f 100644 --- a/src/notes/notes.service.ts +++ b/src/notes/notes.service.ts @@ -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; }