()
| 63 | |
| 64 | |
| 65 | def test_envelope_fields_surfaced(): |
| 66 | err = from_api_exception( |
| 67 | _exc( |
| 68 | 404, |
| 69 | body='{"error":{"code":"agent_not_found","message":"no such agent","details":{"x":1}}}', |
| 70 | headers={"X-Request-Id": "req_abc", "Content-Type": "application/json"}, |
| 71 | ) |
| 72 | ) |
| 73 | assert err.code == "agent_not_found" |
| 74 | assert err.message == "no such agent" |
| 75 | assert err.details == {"x": 1} |
| 76 | assert err.request_id == "req_abc" |
| 77 | |
| 78 | |
| 79 | def test_non_json_body_falls_back_to_status_bucket(): |
nothing calls this directly
no test coverage detected