From 4218d4404ecd8781d4cf56eb00c81a0c1aa3319a Mon Sep 17 00:00:00 2001 From: Tamotsu Takahashi Date: Mon, 17 Oct 2022 14:35:26 +0900 Subject: [PATCH] Remove unescaped url from error message https://github.com/hedgedoc/hedgedoc/pull/2745#discussion_r996485398 Signed-off-by: Tamotsu Takahashi --- .../websocket/utils/extract-note-id-from-request-url.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/realtime/websocket/utils/extract-note-id-from-request-url.ts b/src/realtime/websocket/utils/extract-note-id-from-request-url.ts index e6abe99c4..93bedb1d2 100644 --- a/src/realtime/websocket/utils/extract-note-id-from-request-url.ts +++ b/src/realtime/websocket/utils/extract-note-id-from-request-url.ts @@ -21,7 +21,7 @@ export function extractNoteIdFromRequestUrl(request: IncomingMessage): string { const url = new URL(request.url, 'https://example.org'); const noteId = url.searchParams.get('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 { return noteId; }