- resp.setCode(Status.BAD_REQUEST.getStatusCode());
- resp.setMessage( "MR_Cluster alias not found for dcaeLocation: " + client.getDcaeLocationName());
- resp.setFields("dcaeLocationName");
- logger.warn( resp.toString() );
- return resp.error();
- }
- String url = cluster.getFqdn();
- if ( url == null || url.isEmpty() ) {
-
- resp.setCode(Status.BAD_REQUEST.getStatusCode());
- resp.setMessage("FQDN not set for dcaeLocation " + client.getDcaeLocationName() );
- resp.setFields("fqdn");
- logger.warn( resp.toString() );
- return resp.error();
+ apiError.setCode(Status.BAD_REQUEST.getStatusCode());
+ apiError.setMessage( "MR_Cluster alias not found for dcaeLocation: " + client.getDcaeLocationName());
+ apiError.setFields("dcaeLocationName");
+ logger.warn(apiError.toString());
+ return responseBuilder.error(apiError);