Files
prometeu-studio/prometeu-studio-api/src/main/java/p/studio/api/automation/AutomationFailure.java
T

16 lines
782 B
Java

package p.studio.api.automation;
import java.util.Objects;
/** Stable domain failure codes, independent of HTTP status and JSON-RPC errors. */
public record AutomationFailure(Code code, String message) {
public enum Code {
PROJECT_NOT_OPEN, NOT_GRANTED, INVALID_TASK, BUSY, CLOSED, CLEANUP_FAILED,
UNSUPPORTED_LANGUAGE, UNSUPPORTED_CAPABILITY, REFERENCE_NOT_FOUND, DOCUMENTATION_UNAVAILABLE,
OUTSIDE_PROJECT_SCOPE, READ_ONLY_SCOPE, OPERATION_NOT_FOUND, CLIENT_REQUEST_CONFLICT,
RUNTIME_UNAVAILABLE, RUNTIME_INCOMPATIBLE, SESSION_NOT_FOUND, BUILD_NOT_FOUND,
NO_FRAME_AVAILABLE, LIMIT_EXCEEDED, NOT_CANCELABLE, INFRASTRUCTURE_FAILURE
}
public AutomationFailure { Objects.requireNonNull(code); Objects.requireNonNull(message); }
}