Skip to main content

cloud_sdk_reqwest/shared/
error.rs

1/// Client construction failure.
2#[derive(Clone, Copy, Debug, Eq, PartialEq)]
3pub enum BuildError {
4    /// FIPS transport construction omitted its required trust and revocation policy.
5    FipsTlsPolicyRequired,
6    /// The FIPS trust policy contained no trust anchors.
7    FipsTrustRootsRequired,
8    /// The FIPS trust policy contained no certificate revocation lists.
9    FipsCertificateRevocationListsRequired,
10    /// The selected cryptographic provider did not report FIPS operation.
11    FipsProviderRejected,
12    /// Rustls could not enable its safe protocol-version set for the FIPS provider.
13    FipsProtocolConfigurationFailed,
14    /// The chain-wide, fail-closed certificate revocation verifier could not be configured.
15    FipsRevocationVerifierFailed,
16    /// The complete TLS client configuration did not report FIPS operation.
17    FipsClientConfigurationRejected,
18    /// Rustls could not enable its safe protocol-version set for deterministic roots.
19    WebPkiRootsProtocolConfigurationFailed,
20    /// Reqwest rejected the fixed hardened client configuration.
21    ClientBuildFailed,
22}
23
24/// Payload-free transport failure.
25#[derive(Clone, Copy, Debug, Eq, PartialEq)]
26pub enum TransportError {
27    /// The target could not be composed without parsing or normalization.
28    TargetRejected,
29    /// A non-empty body omitted its required explicit content type.
30    MissingContentType,
31    /// A validated header could not be represented by the HTTP implementation.
32    HeaderRejected,
33    /// Adapter-owned request-body allocation failed.
34    RequestBodyAllocationFailed,
35    /// The request body length cannot be represented by the HTTP client.
36    RequestBodyTooLarge,
37    /// Adapter-owned response-body allocation failed.
38    ResponseBodyAllocationFailed,
39    /// Connection establishment failed.
40    ConnectFailed,
41    /// The configured request or read deadline expired.
42    TimedOut,
43    /// Sending failed for another payload-free reason.
44    RequestFailed,
45    /// The response status is outside the core SDK's admitted HTTP range.
46    InvalidStatus,
47    /// Rate-limit response headers were incomplete, non-decimal, or incoherent.
48    InvalidRateLimitHeaders,
49    /// The declared or observed response body exceeds the caller buffer.
50    ResponseTooLarge,
51    /// Reading the response body failed.
52    ResponseReadFailed,
53    /// The final response origin differed from the configured endpoint.
54    ResponseOriginChanged,
55}