Fix child pane reopening and overload retries
This commit is contained in:
@@ -14,3 +14,16 @@ fn flattened_sse_http_client_error_is_recoverable_transport() {
|
||||
assert_eq!(mapped.kind, AgentErrorKind::Transport);
|
||||
assert!(mapped.recoverable);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn flattened_streamed_provider_overload_is_recoverable() {
|
||||
let error = CompletionError::ProviderError(
|
||||
r#"{"type":"error","error":{"type":"service_unavailable_error","code":"server_is_overloaded","message":"Our servers are currently overloaded. Please try again later."}}"#
|
||||
.to_string(),
|
||||
);
|
||||
|
||||
let mapped = map_completion_error(error);
|
||||
|
||||
assert_eq!(mapped.kind, AgentErrorKind::Provider);
|
||||
assert!(mapped.recoverable);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user