pub enum GenVizError {
Show 15 variants
Auth(String),
Api {
status: u16,
message: String,
},
Billing(String),
RateLimited {
retry_after: Option<Duration>,
},
Timeout(Duration),
UrlExpired,
ContentBlocked(String),
InvalidRequest(String),
Network(String),
Decode(String),
Io(Error),
Json(String),
ProviderNotAvailable(String),
UnexpectedResponse(String),
VideoGeneration(String),
}Expand description
Errors that can occur during media generation.
Variants§
Auth(String)
API key missing or invalid.
Api
API returned an error response.
Fields
Billing(String)
Billing or quota error (HTTP 402, insufficient credits/quota).
RateLimited
Rate limit exceeded.
Fields
Timeout(Duration)
Operation timed out (e.g., Flux/video polling).
UrlExpired
Download URL expired before download.
ContentBlocked(String)
Content was blocked by safety filters.
InvalidRequest(String)
Invalid request parameters.
Network(String)
Network or HTTP error.
Decode(String)
Failed to decode base64 data.
Io(Error)
I/O error (e.g., saving file).
Json(String)
JSON serialization/deserialization error.
ProviderNotAvailable(String)
Provider not available (feature not enabled).
UnexpectedResponse(String)
Unexpected response from the API (valid HTTP status but unexpected body shape).
VideoGeneration(String)
Video generation specific error.
Implementations§
Source§impl GenVizError
impl GenVizError
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Returns true if this error is likely transient and worth retrying.
Sourcepub fn retry_after(&self) -> Option<Duration>
pub fn retry_after(&self) -> Option<Duration>
Returns the suggested retry delay, if available.
Trait Implementations§
Source§impl Debug for GenVizError
impl Debug for GenVizError
Source§impl Display for GenVizError
impl Display for GenVizError
Source§impl Error for GenVizError
impl Error for GenVizError
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
Source§impl From<Error> for GenVizError
impl From<Error> for GenVizError
Source§impl From<Error> for GenVizError
impl From<Error> for GenVizError
Auto Trait Implementations§
impl Freeze for GenVizError
impl !RefUnwindSafe for GenVizError
impl Send for GenVizError
impl Sync for GenVizError
impl Unpin for GenVizError
impl !UnwindSafe for GenVizError
Blanket Implementations§
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.