Skip to content

Commit

Permalink
Fixed issue identifying errors on client (exec)
Browse files Browse the repository at this point in the history
  • Loading branch information
KyGuy2002 committed Apr 25, 2024
1 parent a128efe commit 70e4d13
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/routes/db/[database]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@
const json = await res.json<any>();
if (json) {
if ("error" in json) {
error = json?.error?.cause || json?.error?.message;
if (res.status == 500 && json.code == 400) {
error = json?.message;
duration = undefined;
} else if (res.status == 500) {
error = "An unknown error has occurred. Check the browser devtools for more.";
duration = undefined;
} else {
duration = json.duration;
Expand Down

0 comments on commit 70e4d13

Please sign in to comment.