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 7e826a7 commit f5d54ebCopy full SHA for f5d54eb
llm_client/src/clients/anthropic.rs
@@ -470,6 +470,12 @@ impl AnthropicClient {
470
return Err(LLMClientError::UnauthorizedAccess);
471
}
472
473
+ if let Err(e) = response_stream.error_for_status_ref() {
474
+ let body = response_stream.text().await?;
475
+ println!("anthropic::err {body}");
476
+ return Err(e.into());
477
+ }
478
+
479
let mut event_source = response_stream.bytes_stream().eventsource();
480
481
// let event_next = event_source.next().await;
0 commit comments