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

com.kintone.client.exception.KintoneApiRuntimeException Maven / Gradle / Ivy

// Generated by delombok at Fri Jan 21 13:34:53 JST 2022
package com.kintone.client.exception;

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

/**
 * An exception when Kintone returns a response other than HTTP 200 status.
 */
public class KintoneApiRuntimeException extends KintoneRuntimeException {
    private static final long serialVersionUID = 3766950253072962607L;
    /**
     * The HTTP status code.
     */
    private final int statusCode;
    /**
     * The HTTP response headers.
     */
    private final Map headers;
    /**
     * HTTP response content or {@code null} for none.
     */
    private final String content;

    public KintoneApiRuntimeException(int statusCode, Map headers, String content) {
        super("HTTP error status " + statusCode + ", " + content);
        this.statusCode = statusCode;
        this.headers = Collections.unmodifiableMap(headers);
        this.content = content;
    }

    /**
     * The HTTP status code.
     */
    @java.lang.SuppressWarnings("all")
    public int getStatusCode() {
        return this.statusCode;
    }

    /**
     * The HTTP response headers.
     */
    @java.lang.SuppressWarnings("all")
    public Map getHeaders() {
        return this.headers;
    }

    /**
     * HTTP response content or {@code null} for none.
     */
    @java.lang.SuppressWarnings("all")
    public String getContent() {
        return this.content;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy