mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-09-11 20:34:54 +00:00
fix: improve streamin error to include error_type
This commit is contained in:
parent
21378b325b
commit
a9c8c6a0d7
@ -2541,6 +2541,7 @@ pub struct APIError {
|
||||
#[derive(serde::Serialize)]
|
||||
pub struct ErrorEvent {
|
||||
error: APIError,
|
||||
error_type: String,
|
||||
}
|
||||
|
||||
impl ErrorEvent {
|
||||
@ -2550,6 +2551,7 @@ impl ErrorEvent {
|
||||
message: err.to_string(),
|
||||
http_status_code,
|
||||
},
|
||||
error_type: err.error_type().to_string(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user