Update deployment status message to not confuse user

This commit is contained in:
Andrew Kingston 2021-05-24 14:08:08 +01:00
parent 0b728f07fa
commit 200d006971
1 changed files with 4 additions and 2 deletions

View File

@ -24,11 +24,13 @@
async function deployApp() { async function deployApp() {
try { try {
notifications.info(`Deployment started. Please wait.`)
const response = await api.post("/api/deploy") const response = await api.post("/api/deploy")
const json = await response.json() const json = await response.json()
if (response.status !== 200) { if (response.status !== 200) {
console.log(json)
throw new Error() throw new Error()
} else {
notifications.success(`Application published successfully`)
} }
if (analytics.requestFeedbackOnDeploy()) { if (analytics.requestFeedbackOnDeploy()) {
@ -36,7 +38,7 @@
} }
} catch (err) { } catch (err) {
analytics.captureException(err) analytics.captureException(err)
notifications.error("Deployment unsuccessful. Please try again later.") notifications.error(`Error publishing app: ${err}`)
} }
} }