fixed error handling

This commit is contained in:
mic 2024-08-20 18:16:36 +02:00
parent b330e3eac8
commit 082ef41840

View file

@ -90,11 +90,12 @@ self.onmessage = async function(event) {
if (!response.ok) {
let error_message = '';
let errorDetail = '';
if(response.is_exception === true){
error_message = response.error;
}else{
const errorJSON = await response.json();
const errorDetail = JSON.stringify(errorJSON);
errorDetail = JSON.stringify(errorJSON);
error_message = errorJSON.error.message;
//console.log(">>>>>>>>>>>>> errorJSON.error.message: " + JSON.stringify(errorJSON.error.message));
}