Remove unescaped url from error message

https://github.com/hedgedoc/hedgedoc/pull/2745#discussion_r996485398

Signed-off-by: Tamotsu Takahashi <ttakah+github@gmail.com>
This commit is contained in:
Tamotsu Takahashi 2022-10-17 14:35:26 +09:00 committed by David Mehren
parent 2db114fbff
commit 4218d4404e

View file

@ -21,7 +21,7 @@ export function extractNoteIdFromRequestUrl(request: IncomingMessage): string {
const url = new URL(request.url, 'https://example.org'); const url = new URL(request.url, 'https://example.org');
const noteId = url.searchParams.get('noteId'); const noteId = url.searchParams.get('noteId');
if (noteId === null || noteId === '') { if (noteId === null || noteId === '') {
throw new Error(`Path doesn't contain parameter noteId: ${request.url}`); throw new Error("Path doesn't contain parameter noteId");
} else { } else {
return noteId; return noteId;
} }