package de.gecheckt.pdf.umbenenner.application.port.out;

import java.util.Objects;

/**
 * Technical failure outcome of {@link TargetFolderPort#resolveUniqueFilename(String)}.
 * <p>
 * Indicates that the target folder could not be accessed when attempting to determine
 * a unique filename. This is a transient infrastructure error; the calling use case
 * should treat it as a retryable document-level technical error.
 *
 * @param errorMessage human-readable description of the failure; never null
 */
public record TargetFolderTechnicalFailure(String errorMessage) implements TargetFilenameResolutionResult {

    /**
     * @throws NullPointerException if {@code errorMessage} is null
     */
    public TargetFolderTechnicalFailure {
        Objects.requireNonNull(errorMessage, "errorMessage must not be null");
    }
}
