You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
payments returns CONFLICT error code not declared in PaymentsErrorsEnum, breaking generated clients (infinite retry) #803
The v2/v3 transfer-initiation create path returns "CONFLICT" (ErrUniqueReference) on a duplicate/unique-reference collision, but PaymentsErrorsEnum in openapi.yaml (and the generated client) only declares INTERNAL, VALIDATION, NOT_FOUND.
Generated clients (including orchestration's, used by the CreateTransferInitiation activity) fail to deserialize the response with:
error unmarshalling json response body: invalid value for PaymentsErrorsEnum: CONFLICT
The unmarshal failure is treated as retryable, so orchestration retries the create in a loop instead of surfacing the conflict to the caller. The payable creation looks like a silent failure rather than a rejection.
Impact
Not isolated to a single request: the same error string can affect many workflows on a stack concurrently, with retry attempts accumulating into the thousands, since the enum mismatch causes an unbounded retry loop.
Root cause
The server emits an error code that its own published contract does not declare. V3ErrorsEnum already includes CONFLICT, but the older PaymentsErrorsEnum (used by the v1/v2 CreateTransferInitiation error type PaymentsErrorResponse) does not.
Suggested fix
Add CONFLICT to PaymentsErrorsEnum in the OpenAPI spec and regenerate the client.
Ensure orchestration picks up the regenerated client so the conflict surfaces as a real error instead of an infinite retry.
Refs (@38312593b)
internal/api/v2/errors.go:18,31 — server returns "CONFLICT" (ErrUniqueReference) on transfer-initiation create
pkg/client/models/operations/createtransferinitiation.go:14 — CreateTransferInitiation error typed as PaymentsErrorResponse (ErrorCode = PaymentsErrorsEnum)
pkg/client/models/components/paymentserrorsenum.go — enum allows only INTERNAL/VALIDATION/NOT_FOUND; UnmarshalJSON returns invalid value for PaymentsErrorsEnum: %v
Looks like this was fixed in #805 (commit 472e0af): CONFLICT is now declared in PaymentsErrorsEnum in openapi.yaml and the generated client, and TestErrorCodesAreDeclaredInOpenAPIEnums guards against this regressing. Can this be closed?
Activity
bashkirian commentedon Sep 25, 2026
Looks like this was fixed in #805 (commit 472e0af): CONFLICT is now declared in PaymentsErrorsEnum in openapi.yaml and the generated client, and TestErrorCodesAreDeclaredInOpenAPIEnums guards against this regressing. Can this be closed?