{"record":{"id":"e7c8ad10410e724c","repo":"BerriAI/litellm","slug":"badrequesterror-exception-provider-error-str","errorCode":null,"errorMessage":"BadRequestError: {exception_provider} - {error_str}","messagePattern":"BadRequestError: (.+?) - (.+?)","errorType":"exception","errorClass":"BadRequestError","httpStatus":422,"severity":"error","filePath":"litellm/litellm_core_utils/exception_mapping_utils.py","lineNumber":2113,"sourceCode":"                litellm_debug_info=extra_information,\n            )\n        elif original_exception.status_code == 404:\n            raise NotFoundError(\n                message=f\"NotFoundError: {exception_provider} - {error_str}\",\n                model=model,\n                llm_provider=custom_llm_provider,\n                response=getattr(original_exception, \"response\", None),\n                litellm_debug_info=extra_information,\n            )\n        elif original_exception.status_code == 408:\n            raise Timeout(\n                message=f\"Timeout Error: {exception_provider} - {error_str}\",\n                model=model,\n                llm_provider=custom_llm_provider,\n                litellm_debug_info=extra_information,\n            )\n        elif original_exception.status_code == 422:\n            raise BadRequestError(\n                message=f\"BadRequestError: {exception_provider} - {error_str}\",\n                model=model,\n                llm_provider=custom_llm_provider,\n                response=getattr(original_exception, \"response\", None),\n                litellm_debug_info=extra_information,\n            )\n        elif original_exception.status_code == 429:\n            raise RateLimitError(\n                message=f\"RateLimitError: {exception_provider} - {error_str}\",\n                model=model,\n                llm_provider=custom_llm_provider,\n                response=getattr(original_exception, \"response\", None),\n                litellm_debug_info=extra_information,\n            )\n        elif original_exception.status_code == 503:\n            raise ServiceUnavailableError(\n                message=f\"ServiceUnavailableError: {exception_provider} - {error_str}\",\n                model=model,","sourceCodeStart":2095,"sourceCodeEnd":2131,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/litellm_core_utils/exception_mapping_utils.py#L2095-L2131","documentation":"Error \"BadRequestError: {exception_provider} - {error_str}\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/litellm_core_utils/exception_mapping_utils.py:2113 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the request per the provider's bad-request message."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d","analyzedAt":"2026-08-15T07:12:03.035Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}