MCPcopy Create free account
hub / github.com/BerriAI/litellm / _handle_error

Method _handle_error

litellm/interactions/http_handler.py:51–58  ·  view source on GitHub ↗
(self, e: Exception, provider_config: _ErrorClassSource)

Source from the content-addressed store, hash-verified

49 """
50
51 def _handle_error(self, e: Exception, provider_config: _ErrorClassSource) -> Exception:
52 if isinstance(e, httpx.HTTPStatusError):
53 return provider_config.get_error_class(
54 error_message=e.response.text,
55 status_code=e.response.status_code,
56 headers=dict(e.response.headers),
57 )
58 return e
59
60 def _sync_client(
61 self,

Callers 15

create_interactionMethod · 0.45
get_interactionMethod · 0.45
async_get_interactionMethod · 0.45
delete_interactionMethod · 0.45
cancel_interactionMethod · 0.45
create_agentMethod · 0.45
async_create_agentMethod · 0.45
list_agentsMethod · 0.45
async_list_agentsMethod · 0.45

Calls 2

dictFunction · 0.50
get_error_classMethod · 0.45