MCPcopy Create free account
hub / github.com/CJackHwang/AIstudioProxyAPI / http_error

Function http_error

api_utils/error_utils.py:6–11  ·  view source on GitHub ↗
(
    status_code: int, detail: str, headers: Optional[Dict[str, str]] = None
)

Source from the content-addressed store, hash-verified

4
5
6def http_error(
7 status_code: int, detail: str, headers: Optional[Dict[str, str]] = None
8) -> HTTPException:
9 return HTTPException(
10 status_code=status_code, detail=detail, headers=headers or None
11 )
12
13
14def client_cancelled(req_id: str, message: str = "Request cancelled.") -> HTTPException:

Callers 11

test_http_error_basicFunction · 0.90
client_cancelledFunction · 0.85
client_disconnectedFunction · 0.85
processing_timeoutFunction · 0.85
bad_requestFunction · 0.85
server_errorFunction · 0.85
upstream_errorFunction · 0.85
service_unavailableFunction · 0.85

Calls

no outgoing calls

Tested by 3

test_http_error_basicFunction · 0.72