MCPcopy Index your code
hub / github.com/TaskingAI/TaskingAI / handle_response

Function handle_response

plugin/app/utils.py:57–69  ·  view source on GitHub ↗

Handles the HTTP response, raising specific errors based on the response status and error type. :param response: The HTTP response object to handle. :raises: Raises specific errors based on the response status and error type.

(response)

Source from the content-addressed store, hash-verified

55
56
57async def handle_response(response):
58 """
59 Handles the HTTP response, raising specific errors based on the response status and error type.
60
61 :param response: The HTTP response object to handle.
62 :raises: Raises specific errors based on the response status and error type.
63 """
64 if response.status != 200:
65 result = await response.json()
66 raise_http_error(
67 ErrorCode.PROVIDER_ERROR,
68 f"Error on calling provider model API: {result}",
69 )
70
71
72def checksum(data) -> str:

Callers

nothing calls this directly

Calls 2

raise_http_errorFunction · 0.90
jsonMethod · 0.45

Tested by

no test coverage detected