Skip to content

Commit 6469195

Browse files
committed
Improve key-missing error message
1 parent 4fc3b87 commit 6469195

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

front-end/src/App.svelte

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
const { key } = parsePath();
2626
if (!key) {
2727
setError({
28-
status: 404,
29-
title: "Question not found",
28+
status: 400,
29+
title: "Question key is missing. Please ask for a valid link to the feedback form.",
3030
});
3131
return;
3232
}
@@ -80,14 +80,15 @@
8080
{:else if error}
8181
<Error {error} />
8282
{/if}
83-
{#if question && view === "form"}
84-
<Form {question} />
85-
{:else if question && view === "summary"}
86-
<Summary {question} />
87-
{:else if question && view === "share"}
88-
<Share {question} />
89-
{/if}
83+
9084
{#if question}
85+
{#if view === "form"}
86+
<Form {question} />
87+
{:else if view === "summary"}
88+
<Summary {question} />
89+
{:else if view === "share"}
90+
<Share {question} />
91+
{/if}
9192
<div class="links">
9293
{#if view !== "form"}
9394
<Link target={`/${question.key}`}>Submit an answer</Link>

0 commit comments

Comments
 (0)