A 404 on validate means the simulationId was not found or has expired. Enso Quoter caches simulations for five minutes. Re-simulate to get a fresh ID, then validate again before the user signs.
Definition
Validate can only check an unsigned transaction against a simulation that is still in cache. Once the ID is gone, Quoter cannot compare fields and returns HTTP 404 rather than a valid: false body.
How it works
The documented 404 message looks like “Simulation {id} not found or expired.”
Causes are an expired five-minute cache, a mistyped ID, or an ID from a different environment or key than the one you are calling.
Do not sign on a 404. Call simulate again, review the new
amountOutand gas, and validate the newsimulationIdwithin the window.Validate as close to the signing moment as possible so the check still falls inside the cache.
How Enso does this
POST https://quoter.api.enso.build/api/v1/validate is the endpoint that can return this 404. See Validating Transactions and Error Handling. HTTP 404 here is not the same as result.status: "Error" on simulate, and it is not a field-level failed check.
FAQ
Can I retry the same validate call until it works?
No. If the ID has expired, only a new simulation will produce a usable simulationId.
Is a 404 the same as valid: false?
No. valid: false means the simulation was found and at least one field check failed. 404 means there was no simulation to check.
Related articles
How long is an Enso simulation cached?
Why should I re-simulate instead of retrying validation?
How do I validate that a transaction has not been tampered with?
What is a simulationId?
What if my quote expired?
