The problem is that Ext.data.JsonP seems to be hard-coded to always pass the string "error" to the failure() handler; there's no way to get the error message provided by the backend in the response.

The relevant code causing this 'hard-coded' error message can be seen here and here. In a nutshell, 1) handleError sets request.errorType = 'error', and 2) handleResponse executes the failure callback, passing in request.errorType as the parameter.

Can I request that this be modified to pass more information to the failure callback (e.g., the response object)?