Replace failed to update toasts with one generic string

This commit is contained in:
advplyr 2024-09-29 17:53:52 -05:00
parent c5ecd35fe9
commit 562c30cff4
23 changed files with 27 additions and 44 deletions

View file

@ -473,7 +473,7 @@ export default {
})
.catch((error) => {
console.error('Failed to re-add series to continue listening', error)
this.$toast.error(this.$strings.ToastItemUpdateFailed)
this.$toast.error(this.$strings.ToastFailedToUpdate)
})
.finally(() => {
this.processingSeries = false

View file

@ -816,7 +816,7 @@ export default {
})
.catch((error) => {
console.error('Failed to remove series from home', error)
this.$toast.error(this.$strings.ToastFailedToUpdateUser)
this.$toast.error(this.$strings.ToastFailedToUpdate)
})
.finally(() => {
this.processing = false
@ -834,7 +834,7 @@ export default {
})
.catch((error) => {
console.error('Failed to hide item from home', error)
this.$toast.error(this.$strings.ToastFailedToUpdateUser)
this.$toast.error(this.$strings.ToastFailedToUpdate)
})
.finally(() => {
this.processing = false

View file

@ -130,7 +130,7 @@ export default {
})
.catch((error) => {
console.error('Failed to update notification', error)
this.$toast.error(this.$strings.ToastNotificationUpdateFailed)
this.$toast.error(this.$strings.ToastFailedToUpdate)
})
.finally(() => {
this.enabling = false

View file

@ -296,7 +296,7 @@ export default {
.then((data) => {
this.processing = false
if (data.error) {
this.$toast.error(`${this.$strings.ToastAccountUpdateFailed}: ${data.error}`)
this.$toast.error(`${this.$strings.ToastFailedToUpdate}: ${data.error}`)
} else {
console.log('Account updated', data.user)
@ -313,7 +313,7 @@ export default {
this.processing = false
console.error('Failed to update account', error)
var errMsg = error.response ? error.response.data || '' : ''
this.$toast.error(errMsg || this.$strings.ToastFailedToUpdateAccount)
this.$toast.error(errMsg || this.$strings.ToastFailedToUpdate)
})
},
submitCreateAccount() {

View file

@ -110,7 +110,7 @@ export default {
this.$toast.success(this.$strings.ToastBookmarkUpdateSuccess)
})
.catch((error) => {
this.$toast.error(this.$strings.ToastBookmarkUpdateFailed)
this.$toast.error(this.$strings.ToastFailedToUpdate)
console.error(error)
})
this.show = false

View file

@ -148,7 +148,7 @@ export default {
var result = await this.$axios.$patch(`/api/authors/${this.authorId}`, updatePayload).catch((error) => {
console.error('Failed', error)
const errorMsg = error.response ? error.response.data : null
this.$toast.error(errorMsg || this.$strings.ToastAuthorUpdateFailed)
this.$toast.error(errorMsg || this.$strings.ToastFailedToUpdate)
return null
})
if (result) {

View file

@ -135,7 +135,7 @@ export default {
.catch((error) => {
console.error('Failed to update collection', error)
this.processing = false
this.$toast.error(this.$strings.ToastCollectionUpdateFailed)
this.$toast.error(this.$strings.ToastFailedToUpdate)
})
}
},

View file

@ -178,7 +178,7 @@ export default {
})
.catch((error) => {
console.error('Failed to update device', error)
this.$toast.error(this.$strings.ToastDeviceUpdateFailed)
this.$toast.error(this.$strings.ToastFailedToUpdate)
})
.finally(() => {
this.processing = false

View file

@ -623,7 +623,7 @@ export default {
this.clearSelectedMatch()
this.$emit('selectTab', 'details')
} else {
this.$toast.error(this.$strings.ToastItemDetailsUpdateFailed)
this.$toast.error(this.$strings.ToastFailedToUpdate)
}
} else {
this.clearSelectedMatch()

View file

@ -222,7 +222,7 @@ export default {
if (error.response && error.response.data) {
this.$toast.error(error.response.data)
} else {
this.$toast.error(this.$strings.ToastLibraryUpdateFailed)
this.$toast.error(this.$strings.ToastFailedToUpdate)
}
this.processing = false
})

View file

@ -132,7 +132,7 @@ export default {
})
.catch((error) => {
console.error('Failed to update notification', error)
this.$toast.error(this.$strings.ToastNotificationUpdateFailed)
this.$toast.error(this.$strings.ToastFailedToUpdate)
})
.finally(() => {
this.processing = false

View file

@ -135,7 +135,7 @@ export default {
})
.catch((error) => {
console.error('Failed to remove items from playlist', error)
this.$toast.error(this.$strings.ToastPlaylistUpdateFailed)
this.$toast.error(this.$strings.ToastFailedToUpdate)
this.processing = false
})
},
@ -153,7 +153,7 @@ export default {
})
.catch((error) => {
console.error('Failed to add items to playlist', error)
this.$toast.error(this.$strings.ToastPlaylistUpdateFailed)
this.$toast.error(this.$strings.ToastFailedToUpdate)
this.processing = false
})
},

View file

@ -115,7 +115,7 @@ export default {
.catch((error) => {
console.error('Failed to update playlist', error)
this.processing = false
this.$toast.error(this.$strings.ToastPlaylistUpdateFailed)
this.$toast.error(this.$strings.ToastFailedToUpdate)
})
}
},

View file

@ -78,7 +78,7 @@ export default {
})
.catch((error) => {
console.error('Failed to update collection', error)
this.$toast.error(this.$strings.ToastCollectionUpdateFailed)
this.$toast.error(this.$strings.ToastFailedToUpdate)
})
},
editBook(book) {

View file

@ -92,7 +92,7 @@ export default {
})
.catch((error) => {
console.error('Failed to update playlist', error)
this.$toast.error(this.$strings.ToastPlaylistUpdateFailed)
this.$toast.error(this.$strings.ToastFailedToUpdate)
})
},
init() {

View file

@ -223,7 +223,7 @@ export default {
})
.catch((error) => {
console.error('Failed to remove item from playlist', error)
this.$toast.error(this.$strings.ToastPlaylistUpdateFailed)
this.$toast.error(this.$strings.ToastFailedToUpdate)
})
.finally(() => {
this.processingRemove = false