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

package io.gitea.sdk.exceptions;

/**
 * Thrown when an upload operation fails.
 */
public class UploadException extends GiteaException {
    private final String sessionId;
    private final Integer chunkNumber;

    public UploadException(String message) {
        this(message, null, null);
    }

    public UploadException(String message, String sessionId, Integer chunkNumber) {
        super(message);
        this.sessionId = sessionId;
        this.chunkNumber = chunkNumber;
    }

    public UploadException(String message, Throwable cause, String sessionId, Integer chunkNumber) {
        super(message, cause);
        this.sessionId = sessionId;
        this.chunkNumber = chunkNumber;
    }

    public String getSessionId() {
        return sessionId;
    }

    public Integer getChunkNumber() {
        return chunkNumber;
    }
}
