forked from phoenix/litellm-mirror
(feat) add BadRequestError for Azure
This commit is contained in:
parent
191c1d2887
commit
4fd59c5847
1 changed files with 8 additions and 0 deletions
|
@ -5002,6 +5002,14 @@ def exception_type(
|
|||
model=model,
|
||||
response=original_exception.response
|
||||
)
|
||||
elif "DeploymentNotFound" in error_str:
|
||||
exception_mapping_worked = True
|
||||
raise BadRequestError(
|
||||
message=f"AzureException - {original_exception.message}",
|
||||
llm_provider="azure",
|
||||
model=model,
|
||||
response=original_exception.response
|
||||
)
|
||||
elif hasattr(original_exception, "status_code"):
|
||||
exception_mapping_worked = True
|
||||
if original_exception.status_code == 401:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue