onError method
Error
Implementation
@override
void onError(dynamic response) {
// Process the error response
final dynamic errorAsJson = jsonobject.JsonObjectLite<dynamic>();
generateErrorResponse(errorAsJson, 0);
// Clear the response headers
allResponseHeaders = null;
}