{"record":{"id":"e49c7f1585440315","repo":"BerriAI/litellm","slug":"azureexception-notfounderror-message","errorCode":null,"errorMessage":"AzureException NotFoundError - {message}","messagePattern":"AzureException NotFoundError - (.+?)","errorType":"exception","errorClass":"NotFoundError","httpStatus":404,"severity":"error","filePath":"litellm/litellm_core_utils/exception_mapping_utils.py","lineNumber":1913,"sourceCode":"\n    if \"Internal server error\" in error_str:\n        raise litellm.InternalServerError(\n            message=f\"AzureException Internal server error - {message}\",\n            llm_provider=\"azure\",\n            model=model,\n            litellm_debug_info=extra_information,\n            response=getattr(original_exception, \"response\", None),\n        )\n    elif \"This model's maximum context length is\" in error_str:\n        raise ContextWindowExceededError(\n            message=f\"AzureException ContextWindowExceededError - {message}\",\n            llm_provider=\"azure\",\n            model=model,\n            litellm_debug_info=extra_information,\n            response=getattr(original_exception, \"response\", None),\n        )\n    elif \"DeploymentNotFound\" in error_str:\n        raise NotFoundError(\n            message=f\"AzureException NotFoundError - {message}\",\n            llm_provider=\"azure\",\n            model=model,\n            litellm_debug_info=extra_information,\n            response=getattr(original_exception, \"response\", None),\n        )\n    elif azure_error_code == \"content_policy_violation\" or ExceptionCheckers.is_azure_content_policy_violation_error(\n        error_str\n    ):\n        from litellm.llms.azure.exception_mapping import (\n            AzureOpenAIExceptionMapping,\n        )\n\n        raise AzureOpenAIExceptionMapping.create_content_policy_violation_error(\n            message=message,\n            model=model,\n            extra_information=extra_information,\n            original_exception=original_exception,","sourceCodeStart":1895,"sourceCodeEnd":1931,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/litellm_core_utils/exception_mapping_utils.py#L1895-L1931","documentation":"Azure-specific status mapping: an upstream Azure OpenAI exception with HTTP 404 is re-raised as NotFoundError with the 'AzureException' prefix — typically a wrong deployment name, model path, or api-version.","triggerScenarios":"Thrown at litellm/litellm_core_utils/exception_mapping_utils.py:1913 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the Azure deployment name and api_base; the deployment was not found.","Check AZURE_API_VERSION matches a version supported by the deployment."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}