Often there are situations where the server responses are 200OK, but the response content is not the expected one. Can we trigger the jquery ajax error callback, even if the response is success, based on some criteria in the response?
The response, in my case is a valid json, but not the expected response (schema validation failed), so not a json parsing error.
I'm looking forward to a solution, where the response is evaluated before it actually hits the success or error callbacks.