Hi, I am loading a image trough javascript:
myimage.src = "/mycontroller/mymethod";
myimage.alt = "image";
myimage.onload = function(){
$('body').append(myimage);
};
But, somethimes my controller method should return an error, with the http status 500. So, the content-type will not be "image/png" anymore. Will be text. There's a way to identify this error when loading the image, get the error message and display in alert?
Thanks.