MCPcopy Create free account
hub / github.com/modelscope/modelscope / handle_http_post_error

Function handle_http_post_error

modelscope/hub/errors.py:97–105  ·  view source on GitHub ↗
(response, url, request_body)

Source from the content-addressed store, hash-verified

95
96
97def handle_http_post_error(response, url, request_body):
98 try:
99 response.raise_for_status()
100 except HTTPError as error:
101 message = _decode_response_error(response)
102 raise HTTPError(
103 'Request %s with body: %s exception, '
104 'Response details: %s, request id: %s' %
105 (url, request_body, message, get_request_id(response))) from error
106
107
108def handle_http_response(response: requests.Response,

Callers

nothing calls this directly

Calls 2

_decode_response_errorFunction · 0.85
get_request_idFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…