mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-28 18:10:59 -05:00
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:
parent
2db114fbff
commit
4218d4404e
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue