java. Replaces RpcError with RestError, fixed #222.