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

Function upstream_error

api_utils/error_utils.py:37–39  ·  view source on GitHub ↗
(req_id: str, message: str)

Source from the content-addressed store, hash-verified

35
36
37def upstream_error(req_id: str, message: str) -> HTTPException:
38 # 502 Bad Gateway for upstream/playwright failures
39 return http_error(502, f"[{req_id}] {message}")
40
41
42def service_unavailable(req_id: str, retry_after_seconds: int = 30) -> HTTPException:

Callers 3

test_upstream_errorFunction · 0.90
locate_response_elementsFunction · 0.85

Calls 1

http_errorFunction · 0.85

Tested by 1

test_upstream_errorFunction · 0.72