1
0
Fork 0
mirror of synced 2024-07-01 20:41:03 +12:00

Update deployment status message on error

This commit is contained in:
Andrew Kingston 2021-05-24 14:08:55 +01:00
parent dcd80ac2c4
commit 882c17f384

View file

@ -25,10 +25,8 @@
async function deployApp() {
try {
const response = await api.post("/api/deploy")
const json = await response.json()
if (response.status !== 200) {
console.log(json)
throw new Error()
throw new Error(`status ${response.status}`)
} else {
notifications.success(`Application published successfully`)
}