use of com.linkedin.restli.server.ErrorResponseFormat in project rest.li by linkedin.
the class IndividualResponseException method createErrorResponse.
private static ErrorResponse createErrorResponse(HttpStatus status, String message, ErrorResponseBuilder errorResponseBuilder) {
ErrorResponse errorResponse = new ErrorResponse();
ErrorResponseFormat errorResponseFormat = errorResponseBuilder.getErrorResponseFormat();
if (errorResponseFormat.showStatusCodeInBody()) {
errorResponse.setStatus(status.getCode());
}
if (errorResponseFormat.showMessage()) {
errorResponse.setMessage(message);
}
return errorResponse;
}
Aggregations