pub enum KalshiHttpError {
Show 17 variants
Authentication(ConfigError),
Status(u16),
Network(String),
Http {
status: u16,
evidence: Box<ResponseEvidence>,
},
Venue {
status: u16,
evidence: Box<ResponseEvidence>,
},
Encoding,
Validation(&'static str),
Transport(HttpClientError),
Canceled {
dispatched: bool,
},
Decode {
status: u16,
line: usize,
column: usize,
evidence: Box<ResponseEvidence>,
},
Response {
status: u16,
reason: &'static str,
evidence: Box<ResponseEvidence>,
},
Pagination(&'static str),
AfterSend(Box<Self>),
Discovery(Box<Self>),
Quota(&'static str),
Retry {
reason: RetryError,
dispatched: bool,
},
Parse(String),
}Expand description
Errors emitted by the Kalshi HTTP client.
Variants§
Authentication(ConfigError)
Missing credentials, invalid signing input, or signature-generation failure.
Status(u16)
Non-success response without potentially sensitive body content.
Network(String)
Network-level failure.
Http
HTTP failure retaining a redacted raw body and selected response headers.
Venue
Structured venue failure with its original HTTP status and raw evidence.
Encoding
Failed to encode a request before transmission.
Validation(&'static str)
Invalid request rejected before transmission.
Transport(HttpClientError)
Transport failure whose request may have reached the venue.
Canceled
Request cancellation; dispatch may already have begun when dispatched is true.
Decode
Malformed success payload; the status and raw acknowledgement remain available.
Response
A response whose item count or identities do not match the request.
The operation may have succeeded; callers reconcile using the retained response evidence.
Pagination(&'static str)
A pagination source failed or did not make progress.
AfterSend(Box<Self>)
A later local failure retains possible transmission from an earlier attempt.
Discovery(Box<Self>)
Discovery failed before the requested operation could be transmitted.
Quota(&'static str)
Local token admission failed before transmission.
Retry
Retry termination retaining monotonic possible-transmission evidence.
Parse(String)
Failed domain parsing after a successful wire decode.
Implementations§
Source§impl KalshiHttpError
impl KalshiHttpError
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Classifies transient failures independently of operation safety and command outcomes.
Sourcepub fn is_definitely_not_sent(&self) -> bool
pub fn is_definitely_not_sent(&self) -> bool
Returns whether local evidence proves no attempt reached the send operation.
Execution callers can map true to CommandFailure::NotSent. False preserves an unknown
outcome, including duplicate identities, malformed successes, and transport failures.
Trait Implementations§
Source§impl Debug for KalshiHttpError
impl Debug for KalshiHttpError
Source§impl Display for KalshiHttpError
impl Display for KalshiHttpError
Source§impl Error for KalshiHttpError
impl Error for KalshiHttpError
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()
Auto Trait Implementations§
impl Freeze for KalshiHttpError
impl RefUnwindSafe for KalshiHttpError
impl Send for KalshiHttpError
impl Sync for KalshiHttpError
impl Unpin for KalshiHttpError
impl UnsafeUnpin for KalshiHttpError
impl UnwindSafe for KalshiHttpError
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more