If there is an error, then it should call the request with error query parameters, instead of returning ajson