aboutsummaryrefslogtreecommitdiffstats
path: root/services/src/main/java/org/onap/ccsdk/apps/services/RestTransportError.java
blob: 1fd539a6c54b083cde179d947a158f6d625bcade (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package org.onap.ccsdk.apps.services;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonRootName;
import com.fasterxml.jackson.annotation.JsonValue;


@JsonRootName(value = "error")
public class RestTransportError extends RestError {


    public RestTransportError() {
        this.errorType = "transport";
    }

    public RestTransportError(String errorTag, String errorMessage) {
        this.errorType = "transport";
        this.errorTag = errorTag;
        this.errorMessage = errorMessage;
        this.errorInfo = errorMessage;
    }

    public RestTransportError(String errorTag, String errorMessage, Throwable t) {
        this.errorType = "transport";
        this.errorTag = errorTag;
        this.errorMessage = errorMessage;
        this.errorInfo = t.getLocalizedMessage();
    }

}