Skip to content

Commit

Permalink
Merge pull request #55 from KyGuy2002/fix/exec-error-msgs
Browse files Browse the repository at this point in the history
Fixed issue identifying and parsing errors on client (SQL execution input)
  • Loading branch information
JacobLinCool authored Sep 20, 2024
2 parents 4c57dc5 + 70e4d13 commit 675bc77
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 675bc77

Please sign in to comment.