mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
fix(llm_passthrough_endpoints.py): fix raising helpful debug error message
This commit is contained in:
parent
d3baaf7961
commit
f859c6ac0f
1 changed files with 3 additions and 6 deletions
|
@ -542,13 +542,10 @@ async def vertex_proxy_route(
|
|||
user_api_key_dict,
|
||||
stream=is_streaming_request, # type: ignore
|
||||
)
|
||||
except Exception as e:
|
||||
except ProxyException as e:
|
||||
if headers_passed_through:
|
||||
raise Exception(
|
||||
f"No credentials found on proxy for this request. Headers were passed through directly but request failed with error: {str(e)}"
|
||||
)
|
||||
else:
|
||||
raise e
|
||||
e.message = f"No credentials found on proxy for project_name={vertex_project} + location={vertex_location}, check `/model/info` for allowed project + region combinations with `use_in_pass_through: true`. Headers were passed through directly but request failed with error: {e.message}"
|
||||
raise e
|
||||
|
||||
return received_value
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue