Commit 0d52047e authored by Sergio Gimenez's avatar Sergio Gimenez
Browse files

fix(fm): answer the OEG-proxied federation routes only with OPG.04 statuses

On /internal/partners/{partnerOpId}/federations/... OEG relays only the
statuses OPG.04 v1.4.0 declares (200/400/401/404/409/422/500/503/520)
and
turns anything else into its own 502 (OEG §K.6a), so a partner outage
reached the operator as "FM is broken". FM now maps onto that set there,
keeping the cause in `type`:

- partner unreachable 502 -> 503, partner response invalid 502 -> 520
- partner-not-active / agreement-expired 403 -> 409,
  agreement-violation 403 -> 422
- partner rejections: 400/404/409/422 relayed as problem+json (FM writes
  the body if the partner sent none); any other status -> 520
  partner-rejected, so a partner's 401/5xx never reads as ours
- request validation -> 400 problem+json with invalidParams
- unhandled exceptions -> 500 problem+json, no exception text

Inbound EWBI routes are unchanged.
parent d7a075d5
Loading
Loading
Loading
Loading