com.akeyless.api.exceptions.ApiBaseException Maven / Gradle / Ivy
package com.akeyless.api.exceptions;
import com.akeyless.api.utils.APIErrorResponse;
public class ApiBaseException extends Exception {
private static final long serialVersionUID = 1L;
private int statusCode;
private APIErrorResponse errorResponse;
public ApiBaseException(int statusCode, APIErrorResponse errorResponse) {
super(errorResponse.getError() + ". Message: " + errorResponse.getMessage());
this.statusCode = statusCode;
this.errorResponse = errorResponse;
}
public int getResponseCode() {
return statusCode;
}
public APIErrorResponse getErrorResponse() {
return errorResponse;
}
}