private static ResourceManagerException translate(Status status) { Integer code = RPC_TO_HTTP_CODES.get(status.getCode()); if (code == null) { code = BaseHttpServiceException.UNKNOWN_CODE; } return new ResourceManagerException(code, status.getMessage()); }