kopia lustrzana https://github.com/manuelkasper/sotlas-frontend
Show error message from SOTAwatch, if any
rodzic
cf2e411ad2
commit
bcd6f95e0c
|
@ -249,9 +249,13 @@ export default {
|
||||||
this.$parent.close()
|
this.$parent.close()
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
|
let errorText = err.message
|
||||||
|
if (err.response && err.response.data) {
|
||||||
|
errorText = err.response.data
|
||||||
|
}
|
||||||
this.$buefy.dialog.alert({
|
this.$buefy.dialog.alert({
|
||||||
title: 'Error',
|
title: 'Error',
|
||||||
message: 'Could not post alert: ' + err.message,
|
message: 'Could not post alert: ' + errorText,
|
||||||
type: 'is-danger',
|
type: 'is-danger',
|
||||||
ariaRole: 'alertdialog',
|
ariaRole: 'alertdialog',
|
||||||
ariaModal: true
|
ariaModal: true
|
||||||
|
|
|
@ -219,9 +219,13 @@ export default {
|
||||||
this.$parent.close()
|
this.$parent.close()
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
|
let errorText = err.message
|
||||||
|
if (err.response && err.response.data) {
|
||||||
|
errorText = err.response.data
|
||||||
|
}
|
||||||
this.$buefy.dialog.alert({
|
this.$buefy.dialog.alert({
|
||||||
title: 'Error',
|
title: 'Error',
|
||||||
message: 'Could not post spot: ' + err.message,
|
message: 'Could not post spot: ' + errorText,
|
||||||
type: 'is-danger',
|
type: 'is-danger',
|
||||||
ariaRole: 'alertdialog',
|
ariaRole: 'alertdialog',
|
||||||
ariaModal: true
|
ariaModal: true
|
||||||
|
|
Ładowanie…
Reference in New Issue