I would like to create a general error handler which works for both Datasources and RpcRequests.
As per the docs of RPCManager.setHandleErrorCallback:
However, the callback signature is HandleErrorCallback.handleError(DSResponse response, DSRequest request) and DSResponse inherits from RPCResponse, which means handleError() cannot be called with RPCResponse type parameter - and it seems to be not called in the case of an RPCRequest call indeed.
Is it a bug or I miss something?
As per the docs of RPCManager.setHandleErrorCallback:
handleError() will be called if RPCResponse.status is negative and RPCRequest.willHandleError was not set. It is called for both DSResponses and RPCResponses that have a non-success status. You can check whether the response is a DSResponse by checking response.isDSResponse.
Is it a bug or I miss something?
Comment