package net.interfax.rest.client.exception;

public class UnsuccessfulStatusCodeException extends Exception {


    public UnsuccessfulStatusCodeException(String message) {
        super(message);
    }

    public UnsuccessfulStatusCodeException(final String message, final Throwable cause) {
        super(message, cause);
    }

    public UnsuccessfulStatusCodeException(final Throwable cause) {
        super(cause);
    }

    public UnsuccessfulStatusCodeException(final String message, final Throwable cause, final boolean enableSuppression, final boolean writableStackTrace) {
        super(message, cause, enableSuppression, writableStackTrace);
    }

}

@@ -108,92 +108,783 @@
  %7B%0A%0A
-%0A    public UnsuccessfulStatusCodeException(String message) %7B%0A        super(message)
+    private int statusCode;%0A    private String responseBody;%0A%0A    public UnsuccessfulStatusCodeException(int statusCode) %7B%0A        this.statusCode = statusCode;%0A    %7D%0A%0A    public UnsuccessfulStatusCodeException(int statusCode, String responseBody) %7B%0A        this.statusCode = statusCode;%0A        this.responseBody = responseBody;%0A    %7D%0A%0A    public UnsuccessfulStatusCodeException(String message) %7B%0A        super(message);%0A    %7D%0A%0A    public UnsuccessfulStatusCodeException(String message, int statusCode, String responseBody) %7B%0A        super(message);%0A        this.statusCode = statusCode;%0A        this.responseBody = responseBody;%0A    %7D%0A%0A    public UnsuccessfulStatusCodeException(String message, int statusCode) %7B%0A        super(message);%0A        this.statusCode = statusCode
 ;%0A  
@@ -1347,10 +1347,360 @@
 %0A    %7D%0A%0A
+    public int getStatusCode() %7B%0A        return statusCode;%0A    %7D%0A%0A    public void setStatusCode(final int statusCode) %7B%0A        this.statusCode = statusCode;%0A    %7D%0A%0A    public String getResponseBody() %7B%0A        return responseBody;%0A    %7D%0A%0A    public void setResponseBody(final String responseBody) %7B%0A        this.responseBody = responseBody;%0A    %7D%0A%0A
 %7D%0A

Add attributes to capture status code and response body in custom exception