package {{apiPackage}}; /** * The server returned a response that couldn't be processed. */ {{>generatedAnnotation}} public class UnprocessableResponseException extends {{apiPackage}}.UnexpectedApiException { private static final long serialVersionUID = 1L; private {{javax}}.ws.rs.core.Response response; private {{javax}}.ws.rs.ProcessingException processingException; public UnprocessableResponseException({{javax}}.ws.rs.core.Response response, {{javax}}.ws.rs.ProcessingException exception) { super("Response processing failed for response status " + response.getStatus() + ": " + exception.getMessage() + (exception.getCause() != null ? ": " + exception.getCause() : "")); this.response = response; this.processingException = exception; } public {{javax}}.ws.rs.core.Response getResponse() { return response; } public {{javax}}.ws.rs.ProcessingException getProcessingException() { return processingException; } }