[jQuery] .ajax() with dataType: 'jsonp' will not use error callback if request fails

[jQuery] .ajax() with dataType: 'jsonp' will not use error callback if request fails


I'm using an .ajax() call to do a jsonp request to another domain.
When the user is not logged in, however, the server will return a 401
error. Unfortunately, this causes my .ajax() call to fail _without_
calling the error callback. Is this a known bug? Here is my code:
$.ajax({
url: appData.API.workout.get,
data: {date: App.formatDate(date)},
dataType: 'jsonp',
success: function(json) {
Data = json;
model.buildOrderedWorkout();
myCP.Workout.View.initialize();
},
error: function(xOptions, error) {
Controller.requestError(xOptions, error);
}
});
Is there a way to get this request to not fail? I also looked at the
jquery-jsonp plugin, but that didn't really work and did not return
the http status codes.
Thanks for your help,
Mike