Improve upstream error reporting (#34668)
Now we handle more upstream error cases using the same auto-retry logic. Release Notes: - N/A
This commit is contained in:
parent
6c741292df
commit
d470411725
5 changed files with 267 additions and 1 deletions
|
@ -116,6 +116,12 @@ pub enum LanguageModelCompletionError {
|
|||
provider: LanguageModelProviderName,
|
||||
message: String,
|
||||
},
|
||||
#[error("{message}")]
|
||||
UpstreamProviderError {
|
||||
message: String,
|
||||
status: StatusCode,
|
||||
retry_after: Option<Duration>,
|
||||
},
|
||||
#[error("HTTP response error from {provider}'s API: status {status_code} - {message:?}")]
|
||||
HttpResponseError {
|
||||
provider: LanguageModelProviderName,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue