We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 33933a2 commit ca5f6f7Copy full SHA for ca5f6f7
llm_client/src/clients/anthropic.rs
@@ -482,6 +482,12 @@ impl AnthropicClient {
482
return Err(LLMClientError::UnauthorizedAccess);
483
}
484
485
+ if let Err(e) = response_stream.error_for_status_ref() {
486
+ let body = response_stream.text().await?;
487
+ println!("anthropic::err {body}");
488
+ return Err(e.into());
489
+ }
490
+
491
let mut event_source = response_stream.bytes_stream().eventsource();
492
493
// let event_next = event_source.next().await;
0 commit comments