Skip to content

Commit

Permalink
Display error from save
Browse files Browse the repository at this point in the history
  • Loading branch information
frodrigo committed Mar 8, 2024
1 parent 086f0de commit 4cdab9d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions web/src/pages/map/editor-modal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,13 @@ export default Vue.extend({
modify: this.edition_stack,
}),
})
.then(() => {
this.$emit('saved')
.then((response) => {
if (response.ok) {
this.$emit('saved')
} else {
this.status = 'error'
this.error = `${response.status} ${response.statusText}`
}
})
.catch((error) => {
this.status = 'error'
Expand Down

0 comments on commit 4cdab9d

Please sign in to comment.