forked from phoenix/litellm-mirror
fix(http_handler.py): return original response headers
This commit is contained in:
parent
9c35a3b554
commit
aee601d1d8
2 changed files with 4 additions and 1 deletions
|
@ -78,6 +78,7 @@ class MaskedHTTPStatusError(httpx.HTTPStatusError):
|
|||
response=httpx.Response(
|
||||
status_code=original_error.response.status_code,
|
||||
content=original_error.response.content,
|
||||
headers=original_error.response.headers,
|
||||
),
|
||||
)
|
||||
self.message = message
|
||||
|
|
|
@ -1146,7 +1146,9 @@ async def test_exception_with_headers_httpx(
|
|||
|
||||
except litellm.RateLimitError as e:
|
||||
exception_raised = True
|
||||
assert e.litellm_response_headers is not None
|
||||
assert (
|
||||
e.litellm_response_headers is not None
|
||||
), "litellm_response_headers is None"
|
||||
print("e.litellm_response_headers", e.litellm_response_headers)
|
||||
assert int(e.litellm_response_headers["retry-after"]) == cooldown_time
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue