Error handling in _delete_scan(), which is now handled in GUI main.js

This commit is contained in:
jaknapper 2025-05-14 16:11:02 +01:00
parent 0e3c71b958
commit 19d72bef1c
2 changed files with 27 additions and 17 deletions

View file

@ -144,10 +144,16 @@ Vue.mixin({
if (error.response) {
// If the response is a nicely formatted JSON response from the server
if (error.response.data.message) {
return `${error.response.status}: ${error.response.data.message}`;
return `${error.response.data.message}`;
}
if (error.response.data.detail) {
return `${error.response.data.detail}`;
}
// If the response is just some generic error response
return `${error.response.status}: ${error.response.data}`;
if (error.response.data){
return `${error.response.data}`;
}
return `${error.response}`;
}
// If we have an error object with a message, use that
if (error.message) return `${error.message}`;