Map Sume API error codes to messages your app's users can act on

A translation table from Sume HTTP codes such as 402, 409, 413, 415 and 429 to user-facing copy, plus which errors the user cannot fix and should never see raw.

4 min readSume
All posts

Show users a short instruction that matches what they can change, and keep the Sume code and request_id in your logs. Most Sume errors are not the user's fault: a 401, 503 or queue_full is your service's problem, and the user should only see "try again in a moment".

This table splits the documented codes by who can fix them. The codes come from the Sume errors page, read 2026-10-10.

The translation table

Sume error code to user-facing action, from the errors doc read 2026-10-10
Status and codeWho can fix itSay to the user
400 invalid_requestThe userName the field that is wrong and keep their input
401 unauthorizedYouNothing specific; alert your team, show a generic failure
402 insufficient_creditsAccount ownerAsk the owner to add funds; others see "unavailable"
404 not_foundYouThe item is gone or not in this workspace; refresh the list
409 job_not_cancelableNobodyIt already finished; show the result
413 payload_too_largeThe userUse a smaller file
415 unsupported_media_typeYouA bug in your request headers; not shown
429 rate_limitedWaitTry again in a few seconds
429 queue_fullWaitBusy; your request was not accepted, try again soon
503 provider_capacity_exceededWaitBusy; retry later with the same key

Keep two layers

Give the UI a small enum of your own, such as fix_input, ask_owner, retry_later and contact_support, and map Sume codes onto it in one place. The front end then never branches on a vendor string, and a new Sume code falls into contact_support by default instead of breaking a screen.

Failed jobs carry their own public error metadata (category, retryability, next action). Prefer the job's next_action field over guessing from the category, and use the job error categories post for the retry side.

  • Never render the raw message to end users; it is written for developers.
  • Log request_id with every failure so support can find it.
  • Do not put API keys, signed URLs or raw media URLs in a user-visible error or a ticket.

Credits need a special case

A 402 is the one error where the right message depends on the viewer. The workspace owner can act on it; a team member cannot. Check the role before you show a "Top up" button, and for everyone else say the feature is temporarily unavailable. The balance route lets you check before submitting, so a warning banner can appear before any user hits the wall.

Test the mapping

Treat the mapping as code with tests. A simple table-driven test feeds each documented status and code pair through the function and asserts the enum it returns, plus one unknown code that must land on contact_support. Add a case where the body is not JSON at all, because a proxy or a client-blocking layer can answer with plain text, as the urllib 403 post shows.

Review the table when the Sume errors page changes, and keep the copy in one file so that a product writer can change the wording without touching the control flow.

  • One test per documented code.
  • One test for an unknown code.
  • One test for a non-JSON body.
  • One test that a 402 shown to a non-owner never contains the word balance.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume