Surface upstream rate limits from Anthropic (#16118)

This PR makes it so hitting upstream rate limits from Anthropic result
in an HTTP 429 response instead of an HTTP 500.

To do this we need to surface structured errors out of the `anthropic`
crate.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers
2024-08-12 11:59:24 -04:00
committed by GitHub
parent fbb533b3e0
commit ebdb755fef
6 changed files with 144 additions and 47 deletions
Generated
+1
View File
@@ -255,6 +255,7 @@ dependencies = [
"serde",
"serde_json",
"strum",
"thiserror",
"tokio",
]