Skip to content

Commit

Permalink
fix: better error message when saving script
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenfiszel committed May 11, 2022
1 parent bb31c80 commit 02c8bea
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions frontend/src/routes/components/ScriptBuilder.svelte
Expand Up @@ -42,12 +42,7 @@
sendUserToast(`Success! New script version created with hash ${newHash}`)
goto(`/scripts/get/${newHash}`)
} catch (error) {
if (error.status === 400) {
sendUserToast(error.body, true)
} else {
sendUserToast(`Ooops.Something bad happened: ${error}`, true)
console.error(error)
}
sendUserToast(`Impossible to save the script: ${error.body}`, true)
}
}
Expand Down

0 comments on commit 02c8bea

Please sign in to comment.