pub enum UpstreamError {
ConnectFailed(String),
Timeout(Duration),
StatusError {
status: u16,
body: String,
},
StreamError(String),
BadResponse(String),
SerializationError(String),
AllProvidersFailed(String),
}Expand description
Errors returned by the LLM upstream adapter.
Variants§
ConnectFailed(String)
Timeout(Duration)
StatusError
StreamError(String)
BadResponse(String)
Upstream returned a 2xx body that the adapter could not parse (non-JSON
or malformed). Distinct from SerializationError (which is an SMOS-side
request-encoding bug) so the HTTP layer can map it to 502 (upstream’s
fault) rather than 500 (our fault).
SerializationError(String)
AllProvidersFailed(String)
Returned by ReqwestUpstreamRouter::complete when the named
provider is missing from the [[providers]] map. Should be
unreachable in practice (the routing layer validates the
person → provider reference at startup), but is retained for
defensive depth: a hot config edit could otherwise produce a
confusing 404-from-the-upstream instead of a clear 502.
Historically this variant was constructed by the round-robin /
failover pool’s failover path when every configured provider
failed; the new per-person router does not exercise that path,
so the variant is now produced only by the unknown-provider
branch above. Kept (rather than removed) because the HTTP error
mapper still classifies it as 502 and the type is part of the
public API surface (pub enum).
Trait Implementations§
Source§impl Debug for UpstreamError
impl Debug for UpstreamError
Source§impl Display for UpstreamError
impl Display for UpstreamError
Source§impl Error for UpstreamError
impl Error for UpstreamError
1.30.0 · 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()