Request library uses this method in case of error/failure scenario during a request operation.
public void onError ( IRequest aRequest, IResponse aResponse, IRequestStateElement aRequestStateElement )
The listener registered for the request receives the request object, the HttpResponse object which contains the details about the server response, and a RequestStateElement object which provides more details about the occurred error. In case, the error occurs before sending any request to the server, the HttpResponse object will be null.
public class Activity implements INetListener { ... public void onError(IRequest arg0, IResponse arg1, IRequestStateElement arg2) {
arg1.getStatusLine().toString()
arg2.getErrorCode()); } ...}