MCPcopy
hub / github.com/HisMax/RedInk / test_classifies_common_http_statuses

Function test_classifies_common_http_statuses

tests/errors_test.py:68–75  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

66
67
68def test_classifies_common_http_statuses():
69 assert classify_error("HTTP 401: invalid api key").code == "AUTH_OR_PERMISSION"
70 assert classify_error("HTTP 403: forbidden").code == "AUTH_OR_PERMISSION"
71 assert classify_error("HTTP 429: rate limit").code == "RATE_LIMITED"
72
73 upstream = classify_error("HTTP 500: upstream exploded")
74 assert upstream.code == "UPSTREAM_UNAVAILABLE"
75 assert upstream.status == 502
76
77
78def test_error_payload_keeps_compat_error_message():

Callers

nothing calls this directly

Calls 1

classify_errorFunction · 0.90

Tested by

no test coverage detected