Model Error Types¶
This document is non-normative and targets contributors. For generation flow, see the core module. For distribution defaults, see the distribution settings.
Outcome¶
Outcome<T> is the result type used during generation:
Outcome.Success: full result with no errors.Outcome.PartialSuccess: result plus errors (best-effort generation).Outcome.Failure: errors only, no usable result.
Providers should return Outcome rather than throwing, using runProviderSafely.
GenerationError¶
GenerationError captures a provider failure:
providerClass: fully qualified provider class name.message: human-readable error description.context: where the error occurred.exceptionText: optional stack trace for unexpected failures.
ErrorContext¶
ErrorContext provides hierarchical context for error reporting:
Operation: path, method, and optional operation id.Parameter: operation + parameter name/location + optional$ref.RequestBody: operation + optional$ref.
GenerationReport¶
GenerationReport aggregates results across operations:
successfulSuites: generated test suites.errors: all collectedGenerationErrorinstances.summary:GenerationSummarywith per-outcome operation lists.hasErrors: convenience flag.
OperationInfo is the per-operation metadata stored in the summary lists.
ErrorHandlingConfig and ErrorMode¶
ErrorHandlingConfig controls report building:
ErrorMode.FAIL_FAST: stop on the first error.ErrorMode.COLLECT_ALL: collect errors up tomaxErrors.
BudgetExceededException¶
BudgetExceededException is thrown when a hard limit is exceeded:
BudgetType.SCHEMA_COMBINATIONS->testGenerationSettings.maxSchemaCombinations.BudgetType.TEST_CASES_PER_OPERATION->testGenerationSettings.maxTestCasesPerOperation.
Some budget violations are converted to Outcome.Failure at provider boundaries, while others
(such as per-operation test case limits) may propagate unless callers handle them explicitly.
See the core module for where these errors are handled.