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

com.aliyun.datahub.client.exception.DatahubClientException Maven / Gradle / Ivy

There is a newer version: 2.25.6
Show newest version
package com.aliyun.datahub.client.exception;

public class DatahubClientException extends RuntimeException {
    private int httpStatus = 5001;
    private String requestId;
    private String errorCode;
    private String errorMessage;

    public DatahubClientException(String message) {
        super(message);
        this.errorMessage = message;
    }

    public DatahubClientException(int httpStatus, String requestId, String errorCode, String errorMessage) {
        super(errorMessage);
        this.httpStatus = httpStatus;
        this.requestId = requestId;
        this.errorCode = errorCode;
        this.errorMessage = errorMessage;
    }

    public DatahubClientException(DatahubClientException ex) {
        this(ex.getHttpStatus(), ex.getRequestId(), ex.getErrorCode(), ex.getErrorMessage());
    }

    public int getHttpStatus() {
        return httpStatus;
    }

    public String getRequestId() {
        return requestId;
    }

    public String getErrorCode() {
        return errorCode;
    }

    public String getErrorMessage() {
        return errorMessage;
    }

    @Override
    public String getMessage() {
        return "[httpStatus:" + httpStatus + ", requestId:" +
                requestId + ", errorCode:" + errorCode +
                ", errorMessage:" + errorMessage + "]";
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy