error
Module: gateway::client::error
Section titled “Module: gateway::client::error”Contents
Section titled “Contents”Enums
GatewayClientError- Whole-request failures from talking to the firma-run secret gateway,ProtocolViolation- The gateway responded, but the response broke the wire contract. GroupedTransportError- Round-trip failure to the gateway: connect, write, read, or timeout at
firma_secret_provider::gateway::client::error::GatewayClientError
Section titled “firma_secret_provider::gateway::client::error::GatewayClientError”Enum
Whole-request failures from talking to the firma-run secret gateway,
returned by [super::GatewayClient::resolve_batch] and [super::GatewayClient::push_secret].
This is the outer failure mode: connection, framing, and transport
errors that abort the entire call. It is distinct from batch resolution
failure, which [super::GatewayClient::resolve_batch] instead reports in its inner
Result<Vec<SecretString>, ResolveError> — a single unknown placeholder still
fails the whole batch, but as a resolution error rather than a transport
or protocol one. See each function’s # Errors section for the
fail-closed handling callers must apply.
Variants are grouped by what the caller should do, not by which internal step failed:
- [
GatewayClientError::Transport] — the round-trip toendpointdid not complete (connect/read/write failure, a timeout, or the connection closing without a response). Transient; safe to retry. - [
GatewayClientError::ProtocolViolation] — the gateway responded but broke the wire contract. Not a caller bug, but retrying the same request is unlikely to help. - [
GatewayClientError::Rejected] — the gateway understood the request and explicitly refused it (e.g. a malformed placeholder). Retrying without changing the input is pointless. - [
GatewayClientError::Bug] — encoding our own outbound request failed. Should never happen given internally-constructed request data.
Variants:
Transport{ endpoint: crate::endpoint::client::ClientEndpoint, source: TransportError }- The round-trip to the gateway did not complete. Retryable.ProtocolViolation(ProtocolViolation)- The gateway responded but violated the wire protocol. Not retryableRejected(String)- The gateway explicitly rejected the request (via [super::PushResponse::Err]).Bug(serde_json::Error)- Encoding our own outbound request as JSON failed. Should never happen
Trait Implementations:
- Display
fn fmt(self: &Self, __formatter: & mut ::core::fmt::Formatter) -> ::core::fmt::Result
- Error
fn source(self: &Self) -> ::core::option::Option<&dyn ::thiserror::__private18::Error>
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
firma_secret_provider::gateway::client::error::ProtocolViolation
Section titled “firma_secret_provider::gateway::client::error::ProtocolViolation”Enum
The gateway responded, but the response broke the wire contract. Grouped
under [GatewayClientError::ProtocolViolation] because neither is a
caller bug, but neither is safe to blindly retry either.
Variants:
Deserialize(serde_json::Error)- The gateway’s response line did not decode as the expected responseMismatch{ results: usize, placeholders: usize }- [super::GatewayClient::resolve_batch]‘s response array length did not match the number ofPushPlaceholderMismatch{ expected: crate::SecretPlaceholder, actual: crate::SecretPlaceholder }- A successful push response echoed a different placeholder than the oneMaxBufferSizeExceeded
Trait Implementations:
- Error
fn source(self: &Self) -> ::core::option::Option<&dyn ::thiserror::__private18::Error>
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
- Display
fn fmt(self: &Self, __formatter: & mut ::core::fmt::Formatter) -> ::core::fmt::Result
firma_secret_provider::gateway::client::error::TransportError
Section titled “firma_secret_provider::gateway::client::error::TransportError”Enum
Round-trip failure to the gateway: connect, write, read, or timeout at
any stage. Grouped under [GatewayClientError::Transport] because a
caller handles all of them the same way (retry).
Variants:
ConnectionTimeout- Connecting to the gateway timed out.OperationTimeout- The request/response round-trip timed out after connecting.Connect(io::Error)- Connecting to the gateway failed.Write(io::Error)- Writing the request line to the gateway socket failed.Flush(io::Error)- Flushing the gateway socket after writing the request failed.Read(io::Error)- Reading the response line from the gateway socket failed.Empty- The gateway closed the connection without writing a response line.
Trait Implementations:
- Display
fn fmt(self: &Self, __formatter: & mut ::core::fmt::Formatter) -> ::core::fmt::Result
- Error
fn source(self: &Self) -> ::core::option::Option<&dyn ::thiserror::__private18::Error>
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result