Add bounded commit-pinned Hugging Face source streaming
This commit is contained in:
parent
0ad79c597f
commit
e13c01441c
1 changed files with 3595 additions and 26 deletions
25
crates/remora-hf-source/src/error.rs
Normal file
25
crates/remora-hf-source/src/error.rs
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
use std::time::Duration;
|
||||
|
||||
use thiserror::Error;
|
||||
|
||||
#[derive(Clone, Debug, Eq, Error, PartialEq)]
|
||||
pub enum HfSourceError {
|
||||
#[error("Hugging Face source request is invalid")]
|
||||
InvalidRequest,
|
||||
#[error("Hugging Face source authorization failed")]
|
||||
Authorization,
|
||||
#[error("Hugging Face source was not found")]
|
||||
NotFound,
|
||||
#[error("Hugging Face source changed")]
|
||||
SourceChanged,
|
||||
#[error("Hugging Face source returned an unsupported entry")]
|
||||
UnsupportedEntry,
|
||||
#[error("Hugging Face source response is invalid")]
|
||||
InvalidResponse,
|
||||
#[error("Hugging Face source inventory is invalid")]
|
||||
InvalidInventory,
|
||||
#[error("Hugging Face inventory capacity is exhausted")]
|
||||
Capacity,
|
||||
#[error("Hugging Face source failed transiently")]
|
||||
Transient { retry_after: Option<Duration> },
|
||||
}
|
||||
Loading…
Reference in a new issue