aboutsummaryrefslogtreecommitdiffstats
path: root/clustercontroller-utils/src/main/java/com/yahoo/vespa/clustercontroller/utils/staterestapi/errors/StateRestApiException.java
blob: d2fc6d4aa82a56e7e4d67bf3ec6f994c41ef9662 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.clustercontroller.utils.staterestapi.errors;

public abstract class StateRestApiException extends Exception {

    private Integer htmlCode;
    private String htmlStatus;

    public StateRestApiException(String description) {
        super(description);
    }

    public StateRestApiException(String message, Integer htmlCode, String htmlStatus) {
        super(message);
        this.htmlCode = htmlCode;
        this.htmlStatus = htmlStatus != null ? htmlStatus : message;
    }

    public Integer getCode() { return htmlCode; }
    public String getStatus() { return htmlStatus; }

}