Skip to content

Errors ​

Every HTTP error is an RFC 9457 problem document with Content-Type: application/problem+json. Internal details never leave the server.

json
{
  "type": "https://api.plemuz.com/errors/wallet-insufficient-funds",
  "title": "Your balance is too low for this",
  "status": 422,
  "code": "WALLET_INSUFFICIENT_FUNDS",
  "instance": "/v1/wallet/transfers",
  "requestId": "0192f6c4-7a1e-7c3b-9d0f-2b6a1e4c8d10",
  "retryable": false,
  "actions": [
    { "kind": "top_up", "label": "Top up", "deepLink": "https://spread.plemuz.com/wallet/top-up" }
  ]
}

Fields ​

FieldAlwaysMeaning
typeyeshttps://api.plemuz.com/errors/<code-in-kebab-case>.
titleyesA calm, specific sentence, safe to show to people as is. It may be reworded or translated; never parse it.
statusyesThe HTTP status, repeated.
codeyesThe stable contract, DOMAIN_REASON (for example PLAYBACK_LEASE_STALE). A published code keeps its meaning. Branch on this.
instanceyesThe request path.
requestIdyesMatches X-Request-Id and meta.requestId. Include it in support tickets.
retryableyestrue means the same request, unchanged, may succeed later.
actionsnoNext steps the person can take. See below.
errorsnoField errors for validation: [{ path, code, message }].
detailnoExtra context for developers. Don't show it to end users.
remedynoA short hint for refusals that have an answer.

Next actions ​

actions turns a refusal into a way forward. Render each as a button with its label; open deepLink when present. Call-site actions come first, then the code's defaults, with no duplicate kinds.

ts
interface NextAction {
  kind: NextActionKind;
  label: string;              // Show as is
  deepLink?: string;          // Opens the exact screen, see Deep links
  retryAfterSeconds?: number; // For retry and wait
}
kindMeaning
retryTry the same request again, after retryAfterSeconds if given.
waitNothing to do now; try later.
sign_inSign in or sign in again.
verify_emailConfirm the email address.
verify_phoneConfirm the phone number.
verify_identityComplete KYC (BVN or ID document).
subscribeChoose a plan.
start_trialStart the free trial.
top_upAdd money to the wallet.
update_payment_methodFix the card or payment method on file.
update_appThis app version can't do this; update.
complete_profileFill in missing profile details.
contact_supportOnly support can help.
openOpen the screen in deepLink.

Unknown kinds may be added. Show their label with deepLink if present, and ignore them otherwise.

Common codes ​

CodeStatusRetryable
VALIDATION_FAILED400no (see errors)
UNAUTHENTICATED401no
AUTH_TOKEN_EXPIRED401yes, after refresh
FORBIDDEN, ACCESS_DENIED403no
NOT_FOUND404no
PAGINATION_CURSOR_INVALID400no
IDEMPOTENCY_KEY_REQUIRED400no
IDEMPOTENCY_KEY_REUSED422no
IDEMPOTENCY_IN_PROGRESS409yes (Retry-After: 2)
RATE_LIMITED429yes (Retry-After)
INTERNAL_ERROR500yes
DEPENDENCY_UNAVAILABLE503yes

Each reference page lists the codes its endpoints return.

Not found, on purpose

Where existence itself is private (someone else's draft, a session you aren't in), the API answers with the subject's *_NOT_FOUND rather than 403, so nothing leaks.

Realtime errors ​

Socket acknowledgements carry the same codes: { ok: false, error: { code, message, retryable, actions? } }, where message is the same safe title. See Realtime.

Plemuz API v2