MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / test_status_to_class_mapping

Function test_status_to_class_mapping

sdks/python/tests/test_v1_errors.py:27–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25
26
27def test_status_to_class_mapping():
28 cases = {
29 401: E2AAuthError,
30 403: E2APermissionError,
31 404: E2ANotFoundError,
32 409: E2AConflictError,
33 422: E2AValidationError,
34 429: E2ARateLimitError,
35 500: E2AServerError,
36 503: E2AServerError,
37 }
38 for status, klass in cases.items():
39 err = from_api_exception(_exc(status, body="{}"))
40 assert isinstance(err, klass), f"{status} -> {type(err).__name__}"
41 assert err.status == status
42
43
44def test_retryable_flags():

Callers

nothing calls this directly

Calls 2

from_api_exceptionFunction · 0.90
_excFunction · 0.85

Tested by

no test coverage detected