// Copyright 2026 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT

package io.gitea.sdk.exceptions;

/**
 * Thrown when the API returns an error response.
 */
public class ApiException extends GiteaException {
    private final String code;
    private final int statusCode;

    public ApiException(String message, String code, int statusCode) {
        super(message);
        this.code = code;
        this.statusCode = statusCode;
    }

    public String getCode() {
        return code;
    }

    public int getStatusCode() {
        return statusCode;
    }
}
