Skip to content

docs(spec): document new error codes from AT-5324 epic#500

Open
jklein24 wants to merge 3 commits into
mainfrom
grid-error-codes-spec-sync
Open

docs(spec): document new error codes from AT-5324 epic#500
jklein24 wants to merge 3 commits into
mainfrom
grid-error-codes-spec-sync

Conversation

@jklein24
Copy link
Copy Markdown
Contributor

@jklein24 jklein24 commented May 23, 2026

Summary

Documents the server-side error codes added across the AT-5324 error-audit epic so SDKs and integrators have a way to learn them other than triggering them in production. Cross-cutting observation #3 in error-audit/FRESH_REVIEW.md flagged the gap.

Codes documented

Code HTTP Source PR Ticket
WALLET_SIGNATURE_MISSING 401 lightsparkdev/webdev#27767 AT-5342
WALLET_SIGNATURE_MALFORMED 401 #27767 AT-5342
WALLET_SIGNATURE_BODY_MISMATCH 401 #27767 AT-5342
WALLET_SIGNATURE_INVALID 401 #27767 AT-5342
UMA_NOT_FOUND 404 #27758 (closed) AT-5345 (cancelled)
METHOD_NOT_ALLOWED 405 #27747 AT-5325
CONFLICT (newly surfaced for duplicate platformCustomerId) 409 #27766 AT-5348

NOT_IMPLEMENTED (501) was already documented; no change needed.

The 502 codes (VASP_UNREACHABLE, VASP_INVALID_RESPONSE) were initially included but have been removed — AT-5345 was cancelled and the server doesn't emit them. UMA_NOT_FOUND is in the same boat (originally from AT-5345) but is being left in for now pending a separate decision.

Files changed

  • openapi/components/schemas/errors/Error401.yaml — adds the four WALLET_SIGNATURE_* codes
  • openapi/components/schemas/errors/Error404.yaml — adds UMA_NOT_FOUND
  • openapi/components/schemas/errors/Error409.yaml — adds CONFLICT
  • openapi/components/schemas/errors/Error405.yaml (new) — METHOD_NOT_ALLOWED
  • openapi/paths/customers/customers.yaml — adds 405 response, expands 409 description to mention CONFLICT
  • openapi/paths/receiver/uma/receiver_uma_{receiverUmaAddress}.yaml — expands 404 description
  • openapi.yaml + mintlify/openapi.yaml — re-bundled

Constraints honored

  • No error-envelope redesign — only enum extensions.
  • No new endpoints, no semantic changes.
  • make build regenerated the bundle; make lint passes (warnings only, all pre-existing).

Test plan

  • make build succeeds
  • make lint passes (no new errors, pre-existing warnings only)
  • Bundle includes all new codes (grep -E "WALLET_SIGNATURE|UMA_NOT_FOUND|METHOD_NOT_ALLOWED|CONFLICT" openapi.yaml)
  • Mintlify renders the updated error tables without blank-page regressions

Related: epic AT-5324, error-audit/FRESH_REVIEW.md.

Adds the server-side error codes introduced across the AT-5324 error-audit
epic so SDK clients can encode against them without triggering each error
in production.

New codes documented:
- 401: WALLET_SIGNATURE_MISSING / MALFORMED / BODY_MISMATCH / INVALID
  (sparkcore PR #27767, AT-5342)
- 404: UMA_NOT_FOUND (PR #27758, AT-5345)
- 405: METHOD_NOT_ALLOWED (PR #27747, AT-5325)
- 409: CONFLICT, surfaced for duplicate platformCustomerId
  (PR #27766, AT-5348)
- 502: VASP_UNREACHABLE / VASP_INVALID_RESPONSE (PR #27758, AT-5345)

Also wires the new 502 response into GET /receiver/uma/{receiverUmaAddress}
and 405 into POST /customers, updates the 404 and 409 response descriptions
to call out the new codes, and re-bundles openapi.yaml +
mintlify/openapi.yaml. No schema redesign — only enum extensions.

See error-audit/FRESH_REVIEW.md cross-cutting observation #3 for the
underlying gap.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 23, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
grid-flow-builder Ready Ready Preview, Comment May 25, 2026 6:36am

Request Review

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 23, 2026

✱ Stainless preview builds for grid

This PR will update the grid SDKs with the following commit messages.

cli

chore(internal): regenerate SDK with no functional changes

csharp

chore(internal): regenerate SDK with no functional changes

go

chore(internal): regenerate SDK with no functional changes

kotlin

chore(internal): regenerate SDK with no functional changes

openapi

feat(api): add Error405/502 models, wallet signature codes, UMA/VASP error codes

php

chore(internal): regenerate SDK with no functional changes

python

chore(internal): regenerate SDK with no functional changes

ruby

chore(internal): regenerate SDK with no functional changes

typescript

chore(internal): regenerate SDK with no functional changes

Edit this comment to update them. They will appear in their respective SDK's changelogs.

grid-openapi studio · code · diff

Your SDK build had at least one "error" diagnostic, but this did not represent a regression.
generate ❗

grid-ruby studio · code · diff

Your SDK build had at least one "error" diagnostic, but this did not represent a regression.
generate ❗build ⏭️ (prev: build ✅) → lint ❗test ✅

grid-go studio · code · diff

Your SDK build had at least one "error" diagnostic, but this did not represent a regression.
generate ❗build ⏭️ (prev: build ✅) → lint ❗test ❗

go get github.com/stainless-sdks/grid-go@28dcfe38615e1d99f1a275bc80ed0a0d7948cc19
grid-python studio · code · diff

Your SDK build had at least one "error" diagnostic, but this did not represent a regression.
generate ❗build ⏭️ (prev: build ✅) → lint ⏭️ (prev: lint ✅) → test ✅

grid-kotlin studio · code · diff

Your SDK build had at least one "error" diagnostic, but this did not represent a regression.
generate ❗build ⏭️ (prev: build ✅) → lint ⏭️ (prev: lint ✅) → test ❗

grid-typescript studio · code · diff

Your SDK build had at least one "error" diagnostic, but this did not represent a regression.
generate ❗build ⏭️ (prev: build ❗) → lint ⏭️ (prev: lint ❗) → test ❗

grid-csharp studio · code · diff

Your SDK build had at least one "error" diagnostic, but this did not represent a regression.
generate ❗build ⏭️ (prev: build ❗) → lint ⏭️ (prev: lint ❗) → test ❗

grid-php studio · code · diff

Your SDK build had at least one "error" diagnostic, but this did not represent a regression.
generate ❗lint ❗test ✅

grid-cli studio · code · diff

Your SDK build had at least one "error" diagnostic, but this did not represent a regression.
generate ❗build ❗lint ❗test ❗


This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push.
If you push custom code to the preview branch, re-run this workflow to update the comment.
Last updated: 2026-05-25 06:42:32 UTC

@jklein24
Copy link
Copy Markdown
Contributor Author

@greptile review

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 23, 2026

Greptile Summary

This PR extends the OpenAPI spec with seven new error codes from the AT-5324 error-audit epic, adding descriptive documentation so SDK consumers and integrators can discover them without triggering them in production.

  • Error401.yaml gains four WALLET_SIGNATURE_* codes (MISSING, MALFORMED, BODY_MISMATCH, INVALID) for Embedded Wallet signature validation; Error409.yaml gains the generic CONFLICT code for duplicate-platformCustomerId collisions; Error405.yaml is a new schema for METHOD_NOT_ALLOWED, wired into both the POST and GET /customers operations.
  • Error404.yaml and the UMA lookup path description both reference UMA_NOT_FOUND, which the PR notes originates from the cancelled AT-5345 epic and is not currently emitted by the server — this entry is left in pending a separate decision.
  • Both openapi.yaml and mintlify/openapi.yaml are re-bundled outputs from make build and are consistent with one another.

Confidence Score: 5/5

Safe to merge — all changes are additive documentation with no semantic or runtime impact.

The changes extend enum values and description text in YAML schemas only; no application logic is touched. The one notable concern — UMA_NOT_FOUND documenting a code the server does not yet emit — is explicitly acknowledged by the author as a deliberate, deferred decision, and cannot cause a runtime regression in a documentation-only repo.

openapi/components/schemas/errors/Error404.yaml and openapi/paths/receiver/uma/receiver_uma_{receiverUmaAddress}.yaml — both reference UMA_NOT_FOUND, which the author acknowledges the server does not currently emit.

Important Files Changed

Filename Overview
openapi/components/schemas/errors/Error401.yaml Adds four WALLET_SIGNATURE_* codes (MISSING, MALFORMED, BODY_MISMATCH, INVALID) with clear descriptions; enum and description table are in sync.
openapi/components/schemas/errors/Error404.yaml Adds UMA_NOT_FOUND to the global 404 schema; the code originates from the cancelled AT-5345 epic and the server does not currently emit it, making the enum entry potentially misleading to integrators.
openapi/components/schemas/errors/Error405.yaml New schema for METHOD_NOT_ALLOWED; structure is consistent with all other ErrorNNN schemas in the directory.
openapi/components/schemas/errors/Error409.yaml Adds CONFLICT code with a descriptive example; enum and description table are in sync.
openapi/paths/customers/customers.yaml Adds 405 response (in correct numerical order) to both POST and GET operations, and expands the 409 description to name both conflict codes.
openapi/paths/receiver/uma/receiver_uma_{receiverUmaAddress}.yaml Updates 404 description to reference UMA_NOT_FOUND and adds the previously-missing trailing newline; UMA_NOT_FOUND is from cancelled AT-5345 and not currently emitted by the server.
openapi.yaml Re-bundled output; matches mintlify/openapi.yaml identically, consistent with make build output.
mintlify/openapi.yaml Re-bundled Mintlify copy; identical changes to openapi.yaml as expected from the build step.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[API Request] --> B{HTTP Status}
    B -->|401 Unauthorized| C[Error401]
    C --> C1[UNAUTHORIZED]
    C --> C2[INVALID_SIGNATURE]
    C --> C3[WALLET_SIGNATURE_MISSING new]
    C --> C4[WALLET_SIGNATURE_MALFORMED new]
    C --> C5[WALLET_SIGNATURE_BODY_MISMATCH new]
    C --> C6[WALLET_SIGNATURE_INVALID new]
    B -->|404 Not Found| D[Error404]
    D --> D1[TRANSACTION_NOT_FOUND]
    D --> D2[USER_NOT_FOUND]
    D --> D3[... other codes ...]
    D --> D4[UMA_NOT_FOUND new - not yet emitted]
    B -->|405 Method Not Allowed| E[Error405 new]
    E --> E1[METHOD_NOT_ALLOWED]
    B -->|409 Conflict| F[Error409]
    F --> F1[UMA_ADDRESS_EXISTS]
    F --> F2[TRANSACTION_NOT_PENDING_PLATFORM_APPROVAL]
    F --> F3[EMAIL_OTP_EMAIL_ALREADY_EXISTS]
    F --> F4[EMAIL_OTP_CREDENTIAL_SET_CHANGED]
    F --> F5[CONFLICT new]
Loading

Fix All in Claude Code

Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
openapi/paths/receiver/uma/receiver_uma_{receiverUmaAddress}.yaml:52-59
**UMA_NOT_FOUND documented but server doesn't emit it**

The PR description explicitly states that `UMA_NOT_FOUND` "is in the same boat" as the removed 502 codes — it originates from the cancelled AT-5345 epic and the server does not currently emit it. The path description now tells integrators that a 404 from this endpoint will carry the `UMA_NOT_FOUND` code, but in practice the server returns a different code (or no structured code at all) for this case. SDK consumers who generate error-handling stubs from this spec will write `if (code === 'UMA_NOT_FOUND')` and never match in production. If the "pending separate decision" is to eventually emit this code, that's fine — but consider adding a note that the code is provisional, or holding the 404 description update until the decision is resolved.

Reviews (3): Last reviewed commit: "Remove 502 / VASP_UNREACHABLE / VASP_INV..." | Re-trigger Greptile

Comment thread openapi/components/schemas/errors/Error502.yaml Outdated
Comment thread openapi/paths/customers/customers.yaml Outdated
Comment thread openapi/paths/receiver/uma/receiver_uma_{receiverUmaAddress}.yaml Outdated
Comment thread openapi/paths/customers/customers.yaml Outdated
- Mark VASP_INVALID_RESPONSE as Retryable in Error502 schema to match
  path-level description
- Reorder 405 before 409 in POST /customers responses for numeric ordering
- Document 405 METHOD_NOT_ALLOWED on GET /customers as well
- Add trailing newline to receiver_uma_{receiverUmaAddress}.yaml
@jklein24
Copy link
Copy Markdown
Contributor Author

@greptile review

Dropping the 502 documentation since AT-5345 (the server-side change
that would have introduced these codes) was closed without merging.
The spec shouldn't document codes the server doesn't emit.

- Delete openapi/components/schemas/errors/Error502.yaml
- Drop the '502' response from POST /receiver/uma/{receiverUmaAddress}
- Re-bundle openapi.yaml + mintlify/openapi.yaml
@jklein24 jklein24 marked this pull request as ready for review May 25, 2026 06:43
@jklein24 jklein24 requested a review from pengying May 25, 2026 06:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant