Conversation
The V2 docs listed errorCode values with a paraphrase but never showed the string the API returns, and dropped the message templates the V1/Ultra spec carried. An integrator building their own swap UI had to hit the playground to find out what /order actually returns. Verified live on 2026-09-15 (quote-only): the same errorCode 3 returns "Minimum $5 for gasless" for a JUP swap and "Minimum $10 for gasless" for a W swap, so the figure is per request, not fixed. - Show the returned message for each router + errorCode pair - State that the gasless minimum varies per request and that errorMessage is display-only, so logic keys off router + errorCode - Document the HTTP 400 shape, which carries no errorCode at all - Note that these codes do not apply to /execute - Mark aggregator errorCode 2 as not currently returned, pending an owner call on whether it is retired or orphaned Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The V2 docs listed the
/ordererrorCodevalues with a paraphrase ("Swap below minimum for gasless") but never showed the string the API actually returns, and dropped the message templates the V1/Ultra spec carried. An integrator building their own swap UI hit this: they could not tell from the V2 page whaterrorMessagewould contain, tested it in the playground, and asked whether the V1 strings still apply.Verified against the live API on 2026-09-15 (quote-only, nothing signed). The same
errorCode: 3returnsMinimum $5 for gaslessfor a JUP swap andMinimum $10 for gaslessfor a W swap, so the figure is worked out per request, not fixed.Changes
router+errorCodepair now shows the message the API returns, on both the docs page and the specerrorMessageis display-only, so logic keys offrouter+errorCoderequestIdanderroronly and noerrorCodeat all. A client that readserrorCodeunconditionally breaks on that path/order, not/execute(which uses a separatecodefield).claude/rules/product-learning.mdDeliberately not changed
Aggregator
errorCode: 2. We publish it as "Insufficient SOL for gas". That string is not in the source at all (the constant readsTop up 0.01 SOL for gas), the branch has no call sites inswap-api, and it could not be reproduced in ~30 live attempts. This PR marks the row "Not currently returned" rather than deleting it, because whether it is retired or orphaned is an owner call. @yy if it is retired, the row should come out entirely in a follow-up.JupiterZ
errorCode: 4("Token account is frozen") stays undocumented: it exists in source but is intercepted before it can be returned.Also left alone: the formula behind the gasless minimum (internal, will drift), the full list of ~20 HTTP 400 strings (mostly input validation), and any deprecation language on
error(no removal path exists in code).Linear Issues
Checklist
node generate-llms-from-docs.jsrunmint broken-linkspassesnode check-redirects.jspasses (no redirects changed)title,description,llmsDescriptiondocs.jsonnavigation updated (no nav change).claude/rules/updated with any learnings or decisions🤖 Generated with Claude Code