Error handling

From oborchers/fractional-cto · View interactive version

Error handling is an AI agent skill from the GitHub repository oborchers/fractional-cto. This skill should be used when the user is building or reviewing error states, validation errors, permission errors (403), session expiry warnings, offline handling, concurrent edit conflicts, rate limiting, or server error (500) recovery flows. Covers the full taxonomy of SaaS failure modes and gra

How to use this skill

Skill file

The Full Taxonomy of What Goes Wrong

Error handling in SaaS extends far beyond "something went wrong" modals. A production-ready application must account for every failure mode with specific, actionable responses.

Validation Errors

Surface inline, below the specific field, with red borders and actionable text.

Never use toasts for validation errors. Toasts stack, auto-dismiss before reading, and force users to hunt for the relevant field.

Permission Errors (403)

Must explain what the user can't do, why, and what they can do about it.

| Bad | Good |

|-----|------|

| "Access denied" | "Only workspace admins can manage billing. Request access from @admin-name" |

| "Contact your administrator" | Show who has the required permission + a "Request Access" button |

| "Forbidden" | Suggest alternative actions the user CAN take |

Three response options to offer:

  1. Show who has the required permission
  2. Provide a "Request Access" button
  3. Suggest alternative actions

Session Expiry

Special care required. Jared Spool documented a case where a user completed a purchase, opened another tab, returned to find "Your session expired" — with no clarity on whether the purchase completed.

The principle: Always clearly communicate what was saved and what was lost.

Requirements:

For additional session management guidance (adaptive MFA, auth flows), see the authentication skill.

Concurrent Edit Conflicts

The deepest technical-UX intersection. Figma's approach: model documents as property-level maps.

Resolution strategy:

UI requirements:

Network Errors

Graceful degradation is mandatory.

Rules:

Examples

Working implementations in examples/:

Review Checklist

When reviewing or building error handling:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.