Show error message from SOTAwatch, if any

pull/12/merge
Manuel Kasper 2022-12-13 17:31:34 +01:00
rodzic cf2e411ad2
commit bcd6f95e0c
2 zmienionych plików z 10 dodań i 2 usunięć

Wyświetl plik

@ -249,9 +249,13 @@ export default {
this.$parent.close()
})
.catch(err => {
let errorText = err.message
if (err.response && err.response.data) {
errorText = err.response.data
}
this.$buefy.dialog.alert({
title: 'Error',
message: 'Could not post alert: ' + err.message,
message: 'Could not post alert: ' + errorText,
type: 'is-danger',
ariaRole: 'alertdialog',
ariaModal: true

Wyświetl plik

@ -219,9 +219,13 @@ export default {
this.$parent.close()
})
.catch(err => {
let errorText = err.message
if (err.response && err.response.data) {
errorText = err.response.data
}
this.$buefy.dialog.alert({
title: 'Error',
message: 'Could not post spot: ' + err.message,
message: 'Could not post spot: ' + errorText,
type: 'is-danger',
ariaRole: 'alertdialog',
ariaModal: true