#[non_exhaustive]pub enum CommissioningError {
InvalidConfig(&'static str),
UnexpectedResponseKind {
expected: Expectation,
got: Expectation,
},
OutOfOrderResponse(Stage),
DeviceImStatus {
stage: Stage,
im_status: u16,
},
MalformedResponse(Stage),
Attestation(AttestationError),
Noc(NocError),
CaseEstablishmentFailed,
NetworkFeatureUnsupported {
needed: NetworkKind,
},
NetworkRejected {
stage: Stage,
networking_status: u8,
debug_text: Option<String>,
remediation_hint: RemediationHint,
},
}Expand description
Errors emitted by the commissioning state machine.
All variants are #[non_exhaustive] — future sub-phases or future
milestones (M6.5 network commissioning, etc.) can add variants
without breaking SemVer.
CommissioningError is intentionally not Clone. The summary
emitted in super::Action::Abort is a pre-rendered String, so
callers never need to clone the full error.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidConfig(&'static str)
CommissionerConfig failed validation in Commissioner::new.
Carries a &'static str describing which field is bad — no
alloc on the error path.
UnexpectedResponseKind
Caller invoked on_response with an Expectation that does
not match the last poll()’s emitted Expectation.
Fields
expected: ExpectationThe Expectation the state machine emitted with the last Action.
got: ExpectationThe Expectation the caller passed in.
OutOfOrderResponse(Stage)
Caller invoked on_response or on_case_established in a
stage where the state machine is not waiting for input (e.g.
Stage::Cleanup or Stage::SecurePairing).
DeviceImStatus
Device returned a non-OK Interaction Model status for a cluster
command at stage. The 16-bit im_status is the canonical
Matter status code from the response envelope.
Fields
MalformedResponse(Stage)
Response TLV failed to decode at the cluster command level.
Attestation(AttestationError)
Attestation verification failed (chain / signature / CD).
Noc(NocError)
CSR verification or NOC issuance failed.
CaseEstablishmentFailed
CASE establishment failed (caller called
on_response(Expectation::CaseFailed, &[])).
NetworkFeatureUnsupported
The device’s NetworkCommissioning::FeatureMap does not declare
the network type the caller supplied credentials for (e.g.
NetworkCredentials::Thread was supplied but the device’s
FeatureMap lacks the Thread bit). Both Wi-Fi and Thread are
supported network types as of M9-C2 — this variant signals a
device/credential mismatch, not an unsupported network type.
Wording pinned: WeaveHome substring-matches
does not support Thread network type to route Wi-Fi-only devices off
its automatic Thread path. Do not reword without coordinating — the
typed replacement is matter_controller::Error::network_feature_unsupported().
Fields
needed: NetworkKindWhich network type the supplied credentials required.
NetworkRejected
Device rejected AddOrUpdateWiFiNetwork or ConnectNetwork
with a non-OK NetworkCommissioningStatusEnum value
(spec §11.9.5.1).
Fields
debug_text: Option<String>Optional human-readable debug text echoed by the device, capped at the spec’s 512-octet bound at decode. Device-controlled free text — it may name networks (e.g. an SSID); log deliberately.
remediation_hint: RemediationHintMapped remediation category for downstream UI rendering.
Trait Implementations§
Source§impl Debug for CommissioningError
impl Debug for CommissioningError
Source§impl Display for CommissioningError
impl Display for CommissioningError
Source§impl Error for CommissioningError
impl Error for CommissioningError
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()