package dev.photosync.core.provider;

/**
 * Thrown out of a {@link TransferProgress} callback to abandon a transfer that
 * is already on the wire.
 *
 * <p>This is how "remove from queue" works on an upload that has started: the
 * queue flags the job, the next progress callback throws, and the body stream
 * unwinds. Providers must let it escape rather than wrapping it in a
 * {@link ProviderException} -- a cancelled upload is not a failure and must not
 * be retried.
 *
 * <p>Unchecked, because it travels through {@link TransferProgress}, which has
 * no business declaring it.
 */
public final class TransferCancelledException extends RuntimeException {

    public TransferCancelledException(String jobId) {
        super("Transfer " + jobId + " was cancelled", null, false, false);
    }
}
