makeAjaxRequest(): delegate error message responsibility to the handler if any.

This commit is contained in:
Jirka 2022-04-07 17:56:14 +02:00
parent 2c9d244023
commit 1ec4d71db0
2 changed files with 3 additions and 3 deletions

View File

@ -130,7 +130,7 @@ ImageJob.prototype = {
self.image.src = url;
},
error: function(request) {
self.errorMsg = "Image load aborted - XHR error";
self.errorMsg = "Image load aborted - XHR error: Ajax returned " + request.status;
self.finish(false);
}
});

View File

@ -2364,10 +2364,10 @@ function OpenSeadragon( options ){
protocol !== "https:" )) {
onSuccess( request );
} else {
$.console.error( "AJAX request returned %d: %s", request.status, url );
if ( $.isFunction( onError ) ) {
onError( request );
} else {
$.console.error( "AJAX request returned %d: %s", request.status, url );
}
}
}