REFERENCE / ERRORS
↓

Handle the unhappy path.

Clear failures, deliberate retries, and safe wallet behavior.

API and SDK errors

TypeScript
import { Floor1Error } from '@floor1/sdk';

try {
  const quote = await floor1.quote({ token, side: 'buy', amount });
} catch (error) {
  if (error instanceof Floor1Error) {
    console.error(error.code, error.status, error.retryAfterSeconds);
  } else {
    throw error;
  }
}
CodeRecovery
invalid_amount / invalid_token / invalid_slippageCorrect the input before sending another request.
invalid_metadata / invalid_creator_feeFix the mint fields or Arweave URI.
wallet_required / account_requiredConnect a wallet account.
wrong_chainSwitch the connected wallet to Giwa Sepolia.
networkCheck connectivity and offer a manual retry.
invalid_responseDo not sign. Treat the response as unusable.
quote_expiredRequest a fresh quote.
rate_limited / unavailableRespect retryAfterSeconds when present.

Wallet errors

A rejected wallet prompt is not an SDK error. Wallet provider errors, transaction simulation errors, and send failures pass through unchanged. Keep their details available for your wallet UI. The SDK does not retry quote requests or wallet sends automatically.

Contract reverts

TypeScript
import { decodeFloor1Revert } from '@floor1/sdk';

const reason = decodeFloor1Revert(revertData);
RevertMeaning
SlippageOutput moved below the minimum. Request a fresh quote.
NotActiveThe token’s curve is not active.
InsufficientLiquidityThe curve cannot cover the requested output.
PausedThe market or factory is paused.
NotWeth / QuoteNotAllowedQuote asset is unsupported by this call.
FeeTooHighThe requested creator fee share is not accepted.
NotWiredFactory configuration is incomplete.

Unknown revert data returns null. A contract can reject a valid local transaction if state changes before execution. After a broadcast error, check your wallet’s transaction history before submitting again to avoid duplicate trades.