jquery ajax error message on 500 Internal Server Error different on tomcat
and jetty
I have an ajax post call using jQuery that looks like:
var params = {};
params.type = "POST";
params.url = url;
params.success = successFn;
params.error = errorFn;
$.ajax(params);
In this case my url is a web service that intentionally throws an
exception to test error handling. When I run this in jetty, the error
function is called with the exception text. When I run this in Tomcat, the
error function just comes back with "Internal Server Error".
In both cases, I see the exception thrown on the server, but the message
that comes back to the browser is different.
Is this something that I need to handle at an application level? Or is
there a tomcat configuration for this?
No comments:
Post a Comment