mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-05-13 05:10:13 +02:00
fix response logging
This commit is contained in:
parent
08312a4394
commit
f64e78e986
@ -131,10 +131,15 @@ class EmbeddingModel:
|
||||
tries=10, delay=10, exceptions=ModelServerRateLimitError
|
||||
)(final_make_request_func)
|
||||
|
||||
response: Response | None = None
|
||||
|
||||
try:
|
||||
response = final_make_request_func()
|
||||
return EmbedResponse(**response.json())
|
||||
except requests.HTTPError as e:
|
||||
if not response:
|
||||
raise HTTPError("HTTP error occurred - response is None.") from e
|
||||
|
||||
try:
|
||||
error_detail = response.json().get("detail", str(e))
|
||||
except Exception:
|
||||
|
Loading…
x
Reference in New Issue
Block a user