HomeJournalThis post

API error design for humans

API errors need product meaning: cause, safe message, support context, retry behavior, analytics, and recovery.

JP
JP Casabianca
Designer/Engineer · Bogotá

API errors are part of the user experience.

A 400 does not tell a user what to do. A 403 does not explain whether access can be requested. A provider timeout does not tell support whether money moved. A rate limit does not say when to retry. The frontend has to translate system truth into product truth.

Good error design starts before the toast. It starts with the contract: what happened, why it happened, whether the user can fix it, whether the system will retry, what support can see, and what the product should log.

This is one of those details that separates a polished surface from a reliable product.

CodeSystem truth

Validation, auth, permission, conflict, rate limit, provider failure, or unknown.

MessageUser truth

Plain explanation, consequence, action, and expectation.

RecoveryNext path

Edit, retry, wait, request access, contact support, or rollback.

Figure 1: API error design should connect code, cause, message, and recovery.

Classify error by product meaning

HTTP status is not enough. The product needs to know what the error means for the user.

The questions I would use are:

  • Can the user fix it?
  • Should the system retry?
  • Is this temporary?
  • Does support need context?

The mistake is mapping every error to a generic failed toast. That mistake makes the work look finished while hiding the decision that actually matters. It can make a portfolio page louder, a PR harder to review, or a product surface more fragile than it needs to be.

The artifact I want is an error taxonomy based on user action and system owner. It should be plain enough to inspect and specific enough to be useful. If the artifact cannot show the constraint, the decision, and the proof, the story is probably still too vague.

For API-driven product surfaces where validation, permissions, rate limits, provider failures, and recovery paths need human-readable behavior, I want the artifact to be useful before it becomes presentable. It should help someone make a decision, review the risk, or explain the tradeoff without needing a private meeting.

The proof is errors that lead to useful recovery. I would rather show a narrow proof that survives questions than a broad claim that only sounds impressive. A hiring manager should be able to ask how I know, what I owned, what changed, and what I would do differently next time.

Write the contract for the frontend

The API response should include enough structured information for the frontend to render the right state.

The questions I would use are:

  • What code is stable?
  • What message is safe?
  • What fields identify the object?
  • What retry or support action applies?

The mistake is forcing the frontend to parse vague strings. That mistake makes the work look finished while hiding the decision that actually matters. It can make a portfolio page louder, a PR harder to review, or a product surface more fragile than it needs to be.

The artifact I want is an error response contract with code, reason, safe message, action, and correlation ID. It should be plain enough to inspect and specific enough to be useful. If the artifact cannot show the constraint, the decision, and the proof, the story is probably still too vague.

This is where error experience design matters. The work should not depend on taste alone; it should leave a small operating model that another designer, engineer, or reviewer can reuse.

The proof is more consistent UI behavior across routes. I would rather show a narrow proof that survives questions than a broad claim that only sounds impressive. A hiring manager should be able to ask how I know, what I owned, what changed, and what I would do differently next time.

403 roleRequest access

The user lacks a role but an owner can grant it.

403 policyNot available

The object is outside their workspace or plan.

403 lockedTry later

The object is temporarily locked by another process.

Figure 2: The same HTTP status can need different product copy.

Design permission errors carefully

Permission errors need to protect data while still helping the user understand the boundary.

The questions I would use are:

  • Is the object visible?
  • Can access be requested?
  • Who owns approval?
  • What copy avoids leaking private context?

The mistake is showing forbidden without explanation or leaking too much detail. That mistake makes the work look finished while hiding the decision that actually matters. It can make a portfolio page louder, a PR harder to review, or a product surface more fragile than it needs to be.

The artifact I want is a permission error matrix for hidden, disabled, read-only, and requestable states. It should be plain enough to inspect and specific enough to be useful. If the artifact cannot show the constraint, the decision, and the proof, the story is probably still too vague.

For API-driven product surfaces where validation, permissions, rate limits, provider failures, and recovery paths need human-readable behavior, I want the artifact to be useful before it becomes presentable. It should help someone make a decision, review the risk, or explain the tradeoff without needing a private meeting.

The proof is blocked actions that feel intentional. I would rather show a narrow proof that survives questions than a broad claim that only sounds impressive. A hiring manager should be able to ask how I know, what I owned, what changed, and what I would do differently next time.

Make validation errors specific

Validation errors should point to the field, reason, and repair. The user should not have to inspect the form like a detective.

The questions I would use are:

  • Which field failed?
  • What rule failed?
  • What input is accepted?
  • Can previous work be preserved?

The mistake is using backend validation as a surprise after submit. That mistake makes the work look finished while hiding the decision that actually matters. It can make a portfolio page louder, a PR harder to review, or a product surface more fragile than it needs to be.

The artifact I want is a validation error table with field, cause, copy, and recovery. It should be plain enough to inspect and specific enough to be useful. If the artifact cannot show the constraint, the decision, and the proof, the story is probably still too vague.

This is where error experience design matters. The work should not depend on taste alone; it should leave a small operating model that another designer, engineer, or reviewer can reuse.

The proof is forms that respect user effort. I would rather show a narrow proof that survives questions than a broad claim that only sounds impressive. A hiring manager should be able to ask how I know, what I owned, what changed, and what I would do differently next time.

UserCan act

Knows what happened and what useful step remains.

SupportCan explain

Sees reason, source, object, correlation ID, and context.

EngineeringCan debug

Has code, source, trace, route, input, and release metadata.

Figure 3: Error contracts should serve users, support, and engineers.

Treat rate limits as product states

A rate limit can be handled well if the product explains when to retry and what is safe.

The questions I would use are:

  • Why was the limit reached?
  • When can the user retry?
  • Was work saved?
  • Should support see it?

The mistake is showing a scary generic failure for expected throttling. That mistake makes the work look finished while hiding the decision that actually matters. It can make a portfolio page louder, a PR harder to review, or a product surface more fragile than it needs to be.

The artifact I want is a rate-limit state with retry timing and saved-work behavior. It should be plain enough to inspect and specific enough to be useful. If the artifact cannot show the constraint, the decision, and the proof, the story is probably still too vague.

For API-driven product surfaces where validation, permissions, rate limits, provider failures, and recovery paths need human-readable behavior, I want the artifact to be useful before it becomes presentable. It should help someone make a decision, review the risk, or explain the tradeoff without needing a private meeting.

The proof is less panic and fewer duplicate actions. I would rather show a narrow proof that survives questions than a broad claim that only sounds impressive. A hiring manager should be able to ask how I know, what I owned, what changed, and what I would do differently next time.

Handle provider failures with honesty

When a third-party provider fails, the product should explain what is known without making promises it cannot keep.

The questions I would use are:

  • Did the request reach the provider?
  • Is money or data affected?
  • Will retry duplicate work?
  • What can support verify?

The mistake is hiding provider uncertainty behind vague copy. That mistake makes the work look finished while hiding the decision that actually matters. It can make a portfolio page louder, a PR harder to review, or a product surface more fragile than it needs to be.

The artifact I want is a provider failure contract with idempotency and support context. It should be plain enough to inspect and specific enough to be useful. If the artifact cannot show the constraint, the decision, and the proof, the story is probably still too vague.

This is where error experience design matters. The work should not depend on taste alone; it should leave a small operating model that another designer, engineer, or reviewer can reuse.

The proof is safer recovery for high-stakes workflows. I would rather show a narrow proof that survives questions than a broad claim that only sounds impressive. A hiring manager should be able to ask how I know, what I owned, what changed, and what I would do differently next time.

Log errors with release context

Error events should know route, object, user role, release, flag, and correlation ID where appropriate.

The questions I would use are:

  • Where did it happen?
  • Who was affected?
  • Which release shipped?
  • Which flag was active?

The mistake is logging only stack traces and losing product context. That mistake makes the work look finished while hiding the decision that actually matters. It can make a portfolio page louder, a PR harder to review, or a product surface more fragile than it needs to be.

The artifact I want is an error analytics event with stable properties. It should be plain enough to inspect and specific enough to be useful. If the artifact cannot show the constraint, the decision, and the proof, the story is probably still too vague.

For API-driven product surfaces where validation, permissions, rate limits, provider failures, and recovery paths need human-readable behavior, I want the artifact to be useful before it becomes presentable. It should help someone make a decision, review the risk, or explain the tradeoff without needing a private meeting.

The proof is debugging that connects code to user impact. I would rather show a narrow proof that survives questions than a broad claim that only sounds impressive. A hiring manager should be able to ask how I know, what I owned, what changed, and what I would do differently next time.

Test error fixtures

Error states should be part of QA, not something discovered from production screenshots.

The questions I would use are:

  • Can the route render each error?
  • Does mobile copy fit?
  • Does retry work?
  • Does the event fire?

The mistake is checking only the happy path. That mistake makes the work look finished while hiding the decision that actually matters. It can make a portfolio page louder, a PR harder to review, or a product surface more fragile than it needs to be.

The artifact I want is error fixtures for validation, permission, rate limit, provider, and unknown failures. It should be plain enough to inspect and specific enough to be useful. If the artifact cannot show the constraint, the decision, and the proof, the story is probably still too vague.

This is where error experience design matters. The work should not depend on taste alone; it should leave a small operating model that another designer, engineer, or reviewer can reuse.

The proof is a product surface that handles failure visibly. I would rather show a narrow proof that survives questions than a broad claim that only sounds impressive. A hiring manager should be able to ask how I know, what I owned, what changed, and what I would do differently next time.

Show error design in portfolio work

Error design is subtle but strong proof because it shows respect for systems and people under stress.

The questions I would use are:

  • Which failure was hard?
  • What contract changed?
  • What recovery improved?
  • What support context got clearer?

The mistake is hiding error work because it is not a hero screenshot. That mistake makes the work look finished while hiding the decision that actually matters. It can make a portfolio page louder, a PR harder to review, or a product surface more fragile than it needs to be.

The artifact I want is a case-study artifact with error matrix, UI state, and support note. It should be plain enough to inspect and specific enough to be useful. If the artifact cannot show the constraint, the decision, and the proof, the story is probably still too vague.

For API-driven product surfaces where validation, permissions, rate limits, provider failures, and recovery paths need human-readable behavior, I want the artifact to be useful before it becomes presentable. It should help someone make a decision, review the risk, or explain the tradeoff without needing a private meeting.

The proof is a candidate story with engineering depth. I would rather show a narrow proof that survives questions than a broad claim that only sounds impressive. A hiring manager should be able to ask how I know, what I owned, what changed, and what I would do differently next time.

Keep error language maintained

Error copy drifts when APIs, policies, and product behavior change. The matrix should have ownership.

The questions I would use are:

  • Who owns copy?
  • Who owns codes?
  • What changes when policy changes?
  • How are old errors deprecated?

The mistake is letting error handling become a pile of historical strings. That mistake makes the work look finished while hiding the decision that actually matters. It can make a portfolio page louder, a PR harder to review, or a product surface more fragile than it needs to be.

The artifact I want is an error-language owner map with review triggers. It should be plain enough to inspect and specific enough to be useful. If the artifact cannot show the constraint, the decision, and the proof, the story is probably still too vague.

This is where error experience design matters. The work should not depend on taste alone; it should leave a small operating model that another designer, engineer, or reviewer can reuse.

The proof is a failure system that remains understandable. I would rather show a narrow proof that survives questions than a broad claim that only sounds impressive. A hiring manager should be able to ask how I know, what I owned, what changed, and what I would do differently next time.

What I would show in the work

The public version should show the working artifacts, not only the final opinion. For API-driven product surfaces where validation, permissions, rate limits, provider failures, and recovery paths need human-readable behavior, I would include the matrix, the state map, the review checklist, and the before-and-after decision path. Those artifacts make the work feel authored because they reveal how the decision was made.

I would also include what I did not do. That is often where judgment is clearest. Not every useful idea belongs in the first version. Not every dashboard needs live sync. Not every component needs a new prop. Not every AI suggestion belongs in the PR. Naming the boundary helps the reader trust the result.

The page should make the work inspectable without turning into internal documentation. I want enough specificity for an engineering manager to ask serious follow-up questions, and enough restraint that the story still reads like product judgment instead of a dump of process artifacts. The best version makes the artifacts feel inevitable: this was the pressure, this was the decision, this was the receipt, and this is why the outcome is believable.

ClassifyName failure

Cause, severity, ownership, retry behavior, and user impact.

TranslateWrite copy

Title, body, action, support note, and analytics event.

VerifyTest state

Fixture, route, screen, event, and support path.

Figure 4: A good error matrix turns failure into a reusable product system.

Downloadable companion

This topic deserves a companion resource: an API error experience matrix with code, cause, user message, support context, retry behavior, analytics, and owner. It should be useful as a working file, not a decorative download. The resource should help someone repeat the review, pressure-test the decision, and carry the same quality bar into their own product work.

I would keep it concise: one page if possible, with fields for context, constraint, decision, evidence, owner, and follow-up. The value is not the file format. The value is that the artifact turns the article into something someone can use.

Review checklist

Before publishing this work, I would run a short review against the same standard I use for product changes:

  • Is the product pressure concrete?
  • Is my ownership clear?
  • Is the system constraint named?
  • Is there at least one artifact that proves the decision?
  • Does the artifact show a real tradeoff?
  • Is the metric or signal honest about its limits?
  • Are support, operations, accessibility, or release risks named when relevant?
  • Does the writing explain what I intentionally left out?
  • Can a recruiter skim the point quickly?
  • Can an engineer ask a deeper technical question?
  • Does the downloadable resource make the idea reusable?
  • Would I be comfortable defending the claim live?

That checklist keeps the work from becoming a polished but vague page. It also protects the voice. The goal is not to sound like a process manual. The goal is to make the product judgment visible enough that a hiring team can trust the story.

Implementation notes

The implementation version of this idea should be small enough to ship and specific enough to prove. I would start by naming the route, artifact, owner, and verification path before adding polish. If the work touches content, I would check the source body, generated route, metadata, sitemap, and social image. If it touches UI, I would check desktop, mobile, long content, empty state, keyboard path, and the most likely failure state. If it touches data, I would name the source of truth, freshness, migration path, and what support or product should see after launch.

That implementation note matters because error experience design can drift when the work moves from idea to code. A good article can describe the principle, but a good product change needs the boring details: filenames, states, commands, rollback, ownership, and the reason the first version is intentionally narrow.

I would also write the follow-up before shipping. Follow-up is not a sign that the work is incomplete; it is a sign that the boundary is known. The first version should solve the risky problem, prove the pattern, and leave the next step visible. That is how small teams move quickly without pretending every release is final.

For portfolio proof, these implementation notes are useful because they make the story harder to fake. They show that I understand the difference between a good idea, a shippable version, and a maintainable system. They also give an interviewer concrete places to dig: why this scope, why this artifact, why this verification path, and what changed after the first release.

Case-study packaging

If this became a Work section detail, I would package it as a small evidence stack. The top should explain the product pressure in plain language. The middle should show the artifact and the operating decision it supported. The bottom should show the verification and the follow-up. That structure keeps the story from becoming either a pretty screenshot or a private engineering note.

The captions matter here. A caption should not say "dashboard view" or "component states" and stop there. It should explain what the reader is supposed to learn: this matrix shows why the first version stayed narrow, this state map shows where recovery mattered, this QA note shows how the release was proved, or this event taxonomy shows how product language became measurable.

I would keep the packaging honest by including one caveat. The caveat might be a metric limitation, a data freshness issue, a rollout boundary, a support dependency, or a follow-up that intentionally stayed out of scope. That caveat does not weaken the case study. It makes the judgment feel real.

The final test is whether the page creates a better conversation. If the artifact helps someone ask a sharper question about product judgment, implementation detail, or release proof in real live interviews together, it belongs in the story.

Interview angle

In an interview, I would explain this through API errors as product communication, not only transport failure. The story should start with the product pressure, then move into the system constraint, the artifact, and the proof. That order keeps the answer grounded. It also gives the interviewer several places to go deeper: data, frontend architecture, design systems, support, migration, accessibility, or release process.

The strongest version of the answer includes a tradeoff. I want to be able to say what I chose, what I left alone, and how I knew the work helped. That is more credible than presenting every project as a clean win.

The hiring signal

API error design is a hiring signal because it shows I can bridge backend contracts, frontend states, product copy, support needs, and user recovery.

That is the level I want this site to communicate. The work should show taste, but it should also show operating judgment. It should make me look like someone who can enter a real product system, understand the messy middle, ship the useful version, and leave enough proof for the next person to trust it.

Companion artifacts

Use this after reading.

Practical downloads and templates that turn the article into something you can bring into a product review, implementation pass, or agent workflow.

DownloadJun 2026

Postman API Review Checklist

A review checklist for API collections, auth, examples, edge cases, docs, testing, and agent-ready API behavior.

PostmanAPIsTesting
View details
RepoJun 2026

Agent-Ready API Spec Template

An OpenAPI and Postman starter template for APIs that AI agents can discover, call, and recover from safely.

OpenAPIPostmanAI agents
View details
DownloadJun 2026

Front-End State Recipes

Reusable recipes for optimistic actions, loading, empty, error, data-transition, and disabled-control states.

FrontendStatesUX
View details