Skip to content

error

Enums


firma_secret_provider::broker::client::error::BrokerClientError

Section titled “firma_secret_provider::broker::client::error::BrokerClientError”

Enum

Whole-request failures from talking to the out-of-sandbox secret broker.

Returned by [super::BrokerClient]. Variants are grouped by what the caller should do, not by which internal step failed:

  • [BrokerClientError::Unavailable] — no request reached the broker, so a retry cannot duplicate tool execution.
  • [BrokerClientError::OutcomeUnknown] — the request may have reached the broker and executed, but no valid response arrived. Retrying can duplicate execution and requires caller-level idempotency or deduplication.
  • PeerAuthentication — the connected Unix peer could not be authenticated as the current user. Not retryable without fixing the endpoint or its ownership.
  • [BrokerClientError::ProtocolViolation] — the broker responded but broke the wire contract. Not a caller bug, but retrying the same request is unlikely to help.
  • [BrokerClientError::Rejected] — the broker understood the request and explicitly refused it: the handler’s config matching or authorization did not allow the tool to run, or the tool could not be launched. Retrying without changing the input is unlikely to help.
  • [BrokerClientError::InvalidEndpoint] — the endpoint fails an address-level invariant (non-loopback TCP, relative Unix path). A configuration error; not retryable.
  • [BrokerClientError::InvalidBinaryName] and [BrokerClientError::RequestTooLarge] — the request cannot be sent as configured. Caller or configuration errors; not retryable unchanged.
  • [BrokerClientError::Bug] — encoding our own outbound request failed. Should never happen given internally-constructed request data.

Variants:

  • Unavailable{ endpoint: crate::endpoint::client::ClientEndpoint, source: UnavailableError } - The broker could not be reached, and the request was not dispatched.
  • OutcomeUnknown{ endpoint: crate::endpoint::client::ClientEndpoint, source: OutcomeUnknownError } - The request may have executed, but no valid response arrived.
  • PeerAuthentication{ endpoint: crate::endpoint::client::ClientEndpoint, source: PeerAuthenticationError } - The connected Unix peer failed same-user authentication.
  • ProtocolViolation(ProtocolViolation) - The broker responded but violated the wire protocol. Not retryable
  • Rejected(String) - The broker explicitly rejected the request (via
  • InvalidEndpoint(String) - The endpoint fails an address-level invariant. Configuration error.
  • InvalidBinaryName(crate::broker::BinaryNameError) - The executable is not a portable basename.
  • RequestTooLarge{ size: usize, max: usize } - The encoded request exceeds the configured outbound limit.
  • Bug(serde_json::Error) - Encoding our own outbound request as JSON failed. Should never happen

Trait Implementations:

  • From
    • fn from(source: BinaryNameError) -> Self
  • 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
  • Error
    • fn source(self: &Self) -> ::core::option::Option<&dyn ::thiserror::__private18::Error>

firma_secret_provider::broker::client::error::OutcomeUnknownError

Section titled “firma_secret_provider::broker::client::error::OutcomeUnknownError”

Enum

A post-connect failure for which tool execution may already have occurred.

Variants:

  • OperationTimeout - The write-then-read round-trip exceeded the operation timeout.
  • Write(io::Error) - Writing the request line failed, possibly after a complete request
  • Read(io::Error) - Reading the response failed after the request was dispatched.
  • Empty - The broker closed the connection without a response after dispatch.

Trait Implementations:

  • 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
  • Error
    • fn source(self: &Self) -> ::core::option::Option<&dyn ::thiserror::__private18::Error>

firma_secret_provider::broker::client::error::PeerAuthenticationError

Section titled “firma_secret_provider::broker::client::error::PeerAuthenticationError”

Enum

Unix peer-authentication failures.

Variants:

  • Credential(io::Error) - Reading the broker’s peer credentials failed.
  • UidMismatch{ expected_uid: u32, actual_uid: u32 } - The broker’s Unix peer did not match the expected user id.

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::broker::client::error::ProtocolViolation

Section titled “firma_secret_provider::broker::client::error::ProtocolViolation”

Enum

The broker responded, but the response broke the wire contract.

Grouped under [BrokerClientError::ProtocolViolation] because neither is a caller bug, but neither is safe to blindly retry either.

Variants:

  • Deserialize(serde_json::Error) - The broker’s response line did not decode as the expected response
  • Output(crate::broker::BrokerResponseDecodeError) - An execution response carried malformed process output.
  • InvalidUtf8(std::string::FromUtf8Error) - The response line is not valid UTF-8.
  • ResponseTooLarge - The response line exceeded

Trait Implementations:

  • 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
  • Error
    • fn source(self: &Self) -> ::core::option::Option<&dyn ::thiserror::__private18::Error>

firma_secret_provider::broker::client::error::UnavailableError

Section titled “firma_secret_provider::broker::client::error::UnavailableError”

Enum

A pre-dispatch connection failure. Retrying cannot duplicate execution.

Variants:

  • ConnectionTimeout - Connecting to the broker timed out.
  • Connect(io::Error) - Connecting to the broker failed.

Trait Implementations:

  • 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
  • Error
    • fn source(self: &Self) -> ::core::option::Option<&dyn ::thiserror::__private18::Error>