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

cloud.genesys.webmessaging.sdk.WebMessagingException Maven / Gradle / Ivy

package cloud.genesys.webmessaging.sdk;

import java.util.Collections;
import java.util.Map;

public class WebMessagingException extends Exception {
    private final int statusCode;
    private final Map headers;
    private final String body;

    public WebMessagingException(int statusCode, String message, Map headers, String body) {
        super(message);
        this.statusCode = statusCode;
        this.headers = Collections.unmodifiableMap(headers);
        this.body = body;
    }

    public WebMessagingException(Throwable cause) {
        super(cause);
        this.statusCode = -1;
        this.headers = Collections.emptyMap();
        this.body = null;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy