All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.akeyless.api.exceptions.ApiBaseException Maven / Gradle / Ivy

There is a newer version: 0.0.10
Show newest version
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;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy