Federation peer state transition not allowed
ERR-P01-FED-3003 - Federation peer state transition not allowed
Section titled “ERR-P01-FED-3003 - Federation peer state transition not allowed”Summary
Section titled “Summary”A request asked the federation peer to move to a state that is not reachable from its current state under the RFC-0001 state machine.
When this is raised
Section titled “When this is raised”POST /v1/admin/federation/peers/:id/transitionwithtarget_statethat is neithertrustednorsuspended, or where the current state does not allow that transition.- An inbound
federation.invitearrives for a peer that is alreadytrustedorsuspended(re-federation must be DELETE-then-POST). - An inbound
federation.suspendorfederation.resumedoes not match the allowed table.
What to do
Section titled “What to do”-
Inspect the current state via
GET /v1/admin/federation/peers/:idand consult the RFC-0001 state machine:invited → pending | revokedpending → trusted | revokedtrusted → suspended | revokedsuspended → trusted | revokedrevoked → (terminal) -
For a fresh handshake against an already-trusted peer, first revoke (
DELETE) thenPOST.
Server-side cause
Section titled “Server-side cause”- Raised by:
packages/identity/src/service/federation/index.ts-transitionPeer,handleInbound(invite,suspend,resumepaths). - Guard:
isTransitionAllowed(currentState, targetState) === false, or the admin transition target is outside{trusted, suspended}.
Example response
Section titled “Example response”{ "type": "https://citizenry.id/errors/ERR-P01-FED-3003", "title": "Federation peer state transition not allowed", "status": 409, "code": "ERR-P01-FED-3003", "message": "trusted → invited not allowed", "detail": { "from": "trusted", "to": "invited" }, "method": "POST", "instance": "/v1/admin/federation/peers/fdp_01J…/transition", "request_url": "https://api.citizenry.id/v1/admin/federation/peers/fdp_01J…/transition", "timestamp": "2026-05-17T09:30:00.000Z"}Related codes
Section titled “Related codes”ERR-P01-FED-3001- peer not found.ERR-P01-FED-3002- peer already exists.
Changelog
Section titled “Changelog”- 0.1.0 - introduced as part of RFC-0001.