Loading
fix(fm): answer the partner registry and identity routes with ProblemDetails
OEG now relays the partner registry and /internal/identity to the portal (open-exposure-gateway, feat/partner-registry-relay). OEG passes an FM error through only when it is ProblemDetails; anything else becomes OEG's 502. On these routes FM still answered a bad body with FastAPI's own plain-JSON 422, so a typo in the portal's partner form reached the operator as "bad gateway" instead of naming the field.
sequenceDiagram
participant P as Portal
participant OEG as OEG
participant FM as FM
P->>OEG: POST /platform/v1/federation/partners {"mcc_mnc": "bad", ...}
OEG->>FM: POST /internal/partners
Note over FM: before: 422 application/json {"detail": [...]}
Note over FM: after: 400 application/problem+json, invalidParams: [{param: "mcc_mnc"}]
FM-->>OEG: 400 ProblemDetails
OEG-->>P: 400, relayed unchanged/internal/partners,/internal/partners/{id}and/internal/identitynow count as OEG-relayed routes inapi/errors.py, like/internal/partners/{id}/federations/...already did. A request validation error becomes400 invalid-requestwithinvalidParams, and an unexpected error becomes a ProblemDetails 500.- Nothing else changes on these routes: 409 registration conflict, 422 incomplete outbound credentials and 404 unknown partner were already ProblemDetails.
- Other
/internalroutes (zones,/internal/federation/outbound) are unchanged. tests/test_partner_registry.py: bad bodies now expect 400 plus the problem shape; there's a new test for a malformed partner id.
Tested: the partner, identity and federation test modules pass (82), and ruff and mypy are clean. End to end on the docker harness through OEG-A to FM-A: a bad mcc_mnc comes back 400 with invalidParams naming it.