Error response format
All error responses include adetail field:
Status codes
Telling the two 402s apart
402 carries two different failures that need opposite fixes: an exhausted AI Credit Wallet
(top up credits) and a plan feature or allowance cap (upgrade the plan). Do not infer which
from the wording of detail — it has been wrong in practice, reporting “insufficient credits” to
a workspace whose wallet was funded.
Every 402 carries an X-Morphic-Error-Code response header: