Skip to content

Add Execution Errors doc for fill and refund failure reasons#352

Open
GiselleNessi wants to merge 4 commits into
mainfrom
giselle/int2-734-add-execution-errors-to-docs
Open

Add Execution Errors doc for fill and refund failure reasons#352
GiselleNessi wants to merge 4 commits into
mainfrom
giselle/int2-734-add-execution-errors-to-docs

Conversation

@GiselleNessi

Copy link
Copy Markdown
Collaborator

Summary

  • Adds a new "Handling Execution Errors" page covering failReason (fill, 57 codes) and refundFailReason (refund, 4 codes), as the fill/refund counterpart to the existing quote-errors page.
  • Wired into Core Concepts nav right after Handling Quote Errors, with a cross-link added there.
  • Descriptions were written by tracing each code's throw site in solver.

Flags for review

  • REFUND_RECIPIENT_IS_VASP — couldn't find this as a literal refundFailReason value in solver; VASP blocks look like they're handled as a manualRefundRequired flag internally. Description is based on that logic — please confirm the API actually returns this string.
  • DEPOSIT_ADDRESS_MISMATCH — no throw site found in solver (may live in relay-kit/protocol). Description is inferred from naming convention, not verified against code.

Closes INT2-734.

Documents failReason (57 codes) and refundFailReason (4 codes) as the
fill/refund counterpart to the existing quote-errors page. Wired into
Core Concepts nav and cross-linked from Handling Quote Errors.
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

Claude finished @GiselleNessi's task in 1m 49s —— View job


Code Review: Add Execution Errors doc

Nice addition — this fills a real gap as the fill/refund counterpart to the quote-errors page. The nav wiring (docs.json:94, right after handling-errors) and the reciprocal cross-link <Tip> on the quote-errors page are both correct and follow the deprecation/cross-ref conventions. Structure matches the §3.3a API concept page profile (feature-guide shape, terse intro, error tables consistent with the existing handling-errors.mdx). A few things worth addressing before merge.

1. Terminology: on-chainonchain (§5)

The style guide is explicit: onchain is one word, no hyphen — and that's the established practice in this folder (see input-validation.mdx, which uses onchain throughout). Two spots in the new page use the hyphenated form:

  • execution-errors.mdx:58 — heading ### On-Chain Execution & Revert Errors
  • execution-errors.mdx:44 — "The on-chain swap executed…"

Fix this →

2. Duplicated codes across the Fill and Refund tables (please confirm)

Two codes appear in both the Fill Errors and Refund Errors tables, with slightly different wording each time:

Code Fill table Refund table
AMOUNT_TOO_LOW_TO_REFUND line 33 — "The amount available is too low to refund once fees are applied." line 121 — "The refund amount is zero or negative before fees, so there's nothing to refund."
NEGATIVE_NEW_AMOUNT_AFTER_FEES line 32 — "After deducting fees, the resulting amount is zero or negative." line 122 — "After deducting fees, the refund amount would be zero or negative."

If these are genuinely returnable as both failReason and refundFailReason, keeping them in both tables is fine — but the two descriptions for the same code should probably be reconciled (they currently read as slightly contradictory for AMOUNT_TOO_LOW_TO_REFUND: "too low once fees applied" vs. "zero or negative before fees"). If they're really only refund reasons, drop them from the Fill table.

Relatedly, AMOUNT_TOO_LOW_TO_REFUND sitting under Solver Capacity & Balance Errors in the Fill section reads oddly — its description is entirely about refunds. Worth double-checking that grouping.

3. Codes shared with the quote-errors page

NO_QUOTES, NO_INTERNAL_SWAP_ROUTES_FOUND, and SWAP_IMPACT_TOO_HIGH also appear on handling-errors.mdx. That's plausible (they can surface both at quote time and fill time), so no change needed — just flagging in case any of them is actually quote-only and slipped in.

4. Author's own flags — still open

You flagged these in the PR description and I couldn't verify them from the docs repo alone (they depend on solver):

  • REFUND_RECIPIENT_IS_VASP — the description asserts the API returns this literal string, but your note says VASP handling looks like an internal manualRefundRequired flag. If the API never surfaces this exact refundFailReason value, it shouldn't be documented as one.
  • DEPOSIT_ADDRESS_MISMATCH — description is inferred from the name, no throw site found. Confirm against relay-kit/protocol before merge, or the entry may mislead.

These two are the only correctness risks I'd consider blocking; everything else is polish. Since the descriptions were traced from throw sites, the rest reads as trustworthy.


Overall: clean, well-organized, on-style. Items 1–2 are quick fixes; items 3–4 just need a confirming glance at solver. I can apply the onchain fix and reconcile the duplicate descriptions if you'd like — just say the word.

@GiselleNessi GiselleNessi self-assigned this Jul 2, 2026
@GiselleNessi GiselleNessi requested a review from pedromcunha July 2, 2026 13:53
@mintlify

mintlify Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
unevenlabs 🟢 Ready View Preview Jul 2, 2026, 2:04 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@pedromcunha

Copy link
Copy Markdown
Member

VASP is Virtual Asset Service Provider, it is returned in the API. Let's omit DEPOSIT_ADDRESS_MISMATCH, looks like legacy error code.

@GiselleNessi

GiselleNessi commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator Author

Pushed fixes: removed DEPOSIT_ADDRESS_MISMATCH (legacy, no assignment sites in solver) and fixed onchain terminology per the style guide.

Update: REFUND_RECIPIENT_IS_VASP is confirmed — it's in the v3 response schema (packages/interfaces/src/requests/v3/response.schema.ts), I was originally checking against the older v2 enums. The doc entry stays.

Checking that schema also surfaced 9 newer fill codes that were missing from the doc — added in 809abf2. Both tables now match the v3 enums exactly. DEPOSIT_ADDRESS_MISMATCH remains omitted per @pedromcunha's call — note it is still present in the v3 enum, so flagging for a final confirm during the solving team review.

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

Claude finished @GiselleNessi's task in 1m 44s —— View job


Code Review: Add Execution Errors doc — PR #352

Re-reviewed after the latest push. Confirming what's resolved and flagging the one item still open.

✅ Resolved since last review

  • onchain terminology — fixed. Heading now reads ### Onchain Execution & Revert Errors (execution-errors.mdx:57) and the prose reads "The onchain swap executed…" (execution-errors.mdx:43). Matches §5 and the sibling input-validation.mdx.
  • DEPOSIT_ADDRESS_MISMATCH — removed, per @pedromcunha's note that it's a legacy code. Good call.
  • REFUND_RECIPIENT_IS_VASP@pedromcunha confirmed VASP (Virtual Asset Service Provider) is returned in the API, so the entry is correct to keep. The description on execution-errors.mdx:123 reads accurately. Consider this one closed unless the solving team says the exact string surfaces via a different path.

🟡 Still open — duplicate codes across Fill and Refund tables

AMOUNT_TOO_LOW_TO_REFUND and NEGATIVE_NEW_AMOUNT_AFTER_FEES still appear in both tables. NEGATIVE_NEW_AMOUNT_AFTER_FEES is fine — the two descriptions are consistent (just fill vs. refund framing). But AMOUNT_TOO_LOW_TO_REFUND still reads contradictorily:

Location Description
Fill table (execution-errors.mdx:32) "The amount available is too low to refund once fees are applied."
Refund table (execution-errors.mdx:120) "The refund amount is zero or negative before fees…"

"once fees are applied" vs. "before fees" point in opposite directions for the same code. Two things to settle:

  1. Reconcile the wording so both rows describe the same condition.
  2. Confirm the grouping/placement. A code named AMOUNT_TOO_LOW_TO_REFUND sitting under Solver Capacity & Balance Errors in the Fill section, with a description entirely about refunds, reads oddly. If it's genuinely returnable as a failReason, its Fill-table description should explain the fill-side condition; if it's really refund-only, drop it from the Fill table.

Since you traced these from throw sites in solver, you're best placed to confirm whether both codes truly surface as failReason and refundFailReason, or only as refundFailReason.

Fix this →

Style/structure checks — all pass

  • Frontmatter (title + verb-first description) present per §2.1. ✅
  • Heading depth stays at ##/### per §2.2. ✅
  • Follows the §3.3a API-concept profile (feature-guide shape, terse intro paragraph, no Requirements). ✅
  • Error Code | Description table format matches the existing handling-errors.mdx exemplar in this folder. ✅
  • Nav wiring correct — execution-errors sits right after handling-errors (docs.json:94), and the reciprocal cross-link <Tip> is in place on both pages (handling-errors.mdx:8). ✅
  • Codes shared with the quote-errors page (NO_QUOTES, NO_INTERNAL_SWAP_ROUTES_FOUND, SWAP_IMPACT_TOO_HIGH) are plausibly surfaced both at quote and fill time — no change needed, just noting.

Overall: clean and on-style; three of four prior items are resolved. The only thing I'd settle before merge is the AMOUNT_TOO_LOW_TO_REFUND wording/placement — a quick solver check will confirm the right shape. I did not make changes, since this was a review request; happy to apply the reconciliation if you'd like.

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

Claude finished @GiselleNessi's task in 1m 4s —— View job


Code Review: Add Execution Errors doc — PR #352

Re-reviewed the current state of the branch (after DEPOSIT_ADDRESS_MISMATCH removal and the onchain terminology fix). The page is clean, well-organized, and on-style. Confirming resolved items and flagging what's still open.

✅ Resolved

  • onchain terminology### Onchain Execution & Revert Errors (execution-errors.mdx:63) and "The onchain swap executed…" (execution-errors.mdx:48) now match §5 and sibling input-validation.mdx.
  • DEPOSIT_ADDRESS_MISMATCH — removed, per @pedromcunha's legacy-code note.
  • REFUND_RECIPIENT_IS_VASP@pedromcunha confirmed VASP is returned in the API. The description on execution-errors.mdx:132 reads accurately. Your standing flag for the solving team is a reasonable belt-and-suspenders check, but nothing blocks merge here.

🟡 Still open — AMOUNT_TOO_LOW_TO_REFUND contradiction + placement

This code appears in both tables with descriptions that point in opposite directions:

Location Description
Fill table (execution-errors.mdx:36) "The amount available is too low to refund once fees are applied."
Refund table (execution-errors.mdx:129) "The refund amount is zero or negative before fees, so there's nothing to refund."

Two things to settle:

  1. Reconcile the wording — "once fees are applied" vs. "before fees" describe different conditions for the same code.
  2. Confirm the Fill-table placement — a code named AMOUNT_TOO_LOW_TO_REFUND, described entirely in refund terms, sitting under Solver Capacity & Balance Errors in the Fill section reads oddly. If it genuinely surfaces as a failReason, its Fill-table row should describe the fill-side condition; if it's refund-only, drop it from the Fill table.

Since you traced these from throw sites, you're best placed to confirm whether it returns as both failReason and refundFailReason or only the latter.

Fix this →

Minor — NEGATIVE_NEW_AMOUNT_AFTER_FEES dual listing

Also in both tables (:35 fill, :130 refund). The two descriptions are consistent (just fill vs. refund framing), so no contradiction — but the same question applies: confirm it truly surfaces as both a failReason and a refundFailReason. If yes, no change needed.

Style/structure — all pass

  • Frontmatter title + verb-first description present (§2.1). ✅
  • Heading depth stays ##/### (§2.2). ✅
  • Follows §3.3a API-concept profile (feature-guide shape, terse intro, no Requirements). ✅
  • Error Code | Description table format matches the handling-errors.mdx exemplar. ✅
  • Nav wiring correct — execution-errors sits right after handling-errors in docs.json, with the reciprocal cross-link <Tip> on both pages (handling-errors.mdx:8). ✅
  • Terminology consistent — onchain, cross-chain, chain/token casing all match §5. ✅
  • Shared codes with the quote-errors page (NO_QUOTES, NO_INTERNAL_SWAP_ROUTES_FOUND, SWAP_IMPACT_TOO_HIGH) plausibly surface at both quote and fill time — no change needed.

Overall: clean and on-style. The only substantive item before merge is the AMOUNT_TOO_LOW_TO_REFUND wording/placement — a quick solver check settles it. This was a review request, so I made no changes; happy to apply the reconciliation if you'd like.
giselle/int2-734-add-execution-errors-to-docs

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

Claude finished @GiselleNessi's task in 56s —— View job


Code Review: Add Execution Errors doc — PR #352

Re-reviewed the current branch state. The page is clean, well-organized, and on-style. Three of the four prior items are resolved; one substantive item remains.

✅ Resolved

  • onchain terminology### Onchain Execution & Revert Errors (execution-errors.mdx:63) and "The onchain swap executed…" (execution-errors.mdx:48) now match §5 and sibling input-validation.mdx.
  • DEPOSIT_ADDRESS_MISMATCH — removed, per @pedromcunha's legacy-code note. ✅
  • REFUND_RECIPIENT_IS_VASP@pedromcunha confirmed VASP is returned by the API. The description on execution-errors.mdx:132 reads accurately. Your standing flag to the solving team is a fine belt-and-suspenders check, but nothing blocks merge here.

🟡 Still open — AMOUNT_TOO_LOW_TO_REFUND contradiction + placement

The same code appears in both tables with descriptions that point in opposite directions:

Location Description
Fill table (execution-errors.mdx:36) "The amount available is too low to refund once fees are applied."
Refund table (execution-errors.mdx:129) "The refund amount is zero or negative before fees, so there's nothing to refund."

Two things to settle:

  1. Reconcile the wording — "once fees are applied" vs. "before fees" describe different conditions for the same code.
  2. Confirm the Fill-table placement — a code named AMOUNT_TOO_LOW_TO_REFUND, described entirely in refund terms, sitting under Solver Capacity & Balance Errors in the Fill section reads oddly. If it genuinely surfaces as a failReason, its Fill-table row should describe the fill-side condition; if it's refund-only, drop it from the Fill table.

Since you traced these from throw sites, you're best placed to confirm whether it returns as both failReason and refundFailReason or only the latter. (I can't verify from the docs repo — this needs a solver glance.)

Fix this →

Minor — NEGATIVE_NEW_AMOUNT_AFTER_FEES dual listing

Also in both tables (:35 fill, :130 refund). The two descriptions are consistent (just fill vs. refund framing), so no contradiction — but the same question applies: confirm it truly surfaces as both a failReason and a refundFailReason. If yes, no change needed.

Style/structure — all pass

  • Frontmatter title + verb-first description present (§2.1). ✅
  • Heading depth stays ##/### (§2.2). ✅
  • Follows the §3.3a API-concept profile (feature-guide shape, terse intro, no Requirements). ✅
  • Error Code | Description table format matches the handling-errors.mdx exemplar. ✅
  • Nav wiring correct — execution-errors sits right after handling-errors (docs.json:96), with the reciprocal cross-link <Tip> on both pages (handling-errors.mdx:8). ✅
  • Terminology consistent — onchain, cross-chain, chain/token casing all match §5. ✅
  • Shared codes with the quote-errors page (NO_QUOTES, NO_INTERNAL_SWAP_ROUTES_FOUND, SWAP_IMPACT_TOO_HIGH) plausibly surface at both quote and fill time — no change needed.

Overall: clean and on-style. The only substantive item before merge is the AMOUNT_TOO_LOW_TO_REFUND wording/placement — a quick solver check settles it. This was a review request, so I made no changes; happy to apply the reconciliation if you'd like.

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.

2 participants