#[non_exhaustive]pub enum DocError {
Show 17 variants
Io {
path: PathBuf,
source: Error,
},
Yaml(String),
UnknownField(String),
NotTestDocument {
path: PathBuf,
},
MissingScenario,
MixedVocabulary {
found: String,
},
RouteSourceMissing,
RouteSourceConflict {
present: String,
},
Validation {
index: usize,
message: String,
},
UnsupportedProvisioning {
value: String,
endpoint: String,
},
ProvisioningWithoutAuthority {
endpoint: String,
ref_scheme: String,
},
ReservedEnvKey {
key: String,
endpoint: String,
},
Partners {
endpoint: String,
message: String,
},
InlineRoutes(String),
InlineRoutesRejected,
ExpectReplyOnUnsupportedSend {
index: usize,
scheme: String,
},
LogsBlock {
detail: String,
},
}Expand description
Parse and validation errors for scenario documents.
Exit-code mapping for the CLI adapter (ADR-0069 section 7): classification is by variant, never by message text. Every variant is a load-time failure and maps to exit 2.
doc-validationclass — Display carries thedoc-validation:token:NotTestDocument,MissingScenario,MixedVocabulary,Validation,ReservedEnvKey,InlineRoutes,InlineRoutesRejected,ProvisioningWithoutAuthority,ExpectReplyOnUnsupportedSend,LogsBlock.infra-unavailableclass —UnsupportedProvisioning(reserved provisioning grammar; Display names the class).- Unit-tier message parity —
RouteSourceMissingandRouteSourceConflictrender the unit-tier parser’s messages verbatim, without the token, so both parsers report identical text; the CLI maps them to exit 2 as doc parse errors, the same as the unit tier does today. - Read and serde failures —
Io,Yaml,UnknownFieldmap to exit 2 as doc parse errors (unreadable file, broken grammar).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Io
The document file could not be read.
Yaml(String)
Malformed YAML or a type mismatch at the serde layer.
UnknownField(String)
A deny_unknown_fields rejection.
NotTestDocument
The path lacks the reserved .test.yaml / .test.yml suffix.
MissingScenario
The document declares no scenario: section.
MixedVocabulary
The document mixes the scenario vocabulary with unit-tier sections.
RouteSourceMissing
No route source is declared. Same message as the unit-tier parser.
RouteSourceConflict
More than one route source is declared. Same message as the unit-tier parser.
Validation
An action failed validation; index is the position in the
scenario: list. An empty scenario: list is rejected with
index 0 (the section, not an action, failed).
Fields
UnsupportedProvisioning
The endpoint declares a provisioning source that is reserved in
v1; only harness is supported.
Fields
ProvisioningWithoutAuthority
A provisioning: harness endpoint reference declares a
bindVar while its scheme (direct: or fake:) binds no
partner, so the variable would never receive a bound authority
and the entry fails later as a verdict-class var-resolution
error (rc-j87j). Rejected at load instead.
Fields
ReservedEnvKey
A document env key equals an endpoint’s bindVar. The
reserved set is exactly the bindVar values declared by the
document’s own endpoints; the harness binding wins.
Partners
A partners entry failed validation; endpoint is the entry
key of the failing script list.
InlineRoutes(String)
Inline routes failed to parse.
InlineRoutesRejected
The document’s route source is inline routes. Inline
definitions cannot boot in v1; the author must declare
routeFiles. Rejected at load, before partners bind, instead
of failing the boot afterward (rc-9dpx).
ExpectReplyOnUnsupportedSend
A send declares expectReply on a scheme that produces no
synchronous reply: only the context-stimulus direct: send
returns one. Partner sends (http/https) park their
roundtrips for a later receive, and fake: adapters record
sends without answering, so the assertion could never run
(rc-qvz6). Rejected at load, naming the action index, the
scheme, and the literal expectReply field.
Fields
LogsBlock
A malformed document-level logs: block (rc-tdgh5): an unknown
key, a level outside the accepted set, or a regex that does not
compile. The detail names the offending clause.
Trait Implementations§
Source§impl Error for DocError
impl Error for DocError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for DocError
impl !UnwindSafe for DocError
impl Freeze for DocError
impl Send for DocError
impl Sync for DocError
impl Unpin for DocError
impl UnsafeUnpin for DocError
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request