Agent skill · supabase
studio-error-handling
Error display and troubleshooting pattern for Supabase Studio. Use when
What it needs
About 3k tokens when loaded.
What this skill does
Studio Error Handling Pattern Full docs and code examples: apps/studio/components/interfaces/ErrorHandling/README.md How it works Classification happens in the data layer: handleError in data/fetchers.ts tests the error message against ERRORPATTERNS and throws the matching error subclass (e.g. ConnectionTimeoutError extends ResponseError). The component (ErrorMatcher) reads errorType from the instance and does an O(1) lookup — it never does regex matching. Key files File Purpose ------------------------------------- ---------------------------------------------------------------- data/error-patterns.ts Array of { pattern, ErrorClass } — the regex lives here types/api-errors.ts Error classes, KnownErrorType union, ClassifiedError type ErrorMatcher.tsx Component — reads errorType, looks up mapping, renders error-mappings.tsx Record<KnownErrorType, { id, Troubleshooting: ComponentType }> errorMappings/ConnectionTimeout.tsx Reference troubleshooting component TroubleshootingSections.tsx Reusable accordion section components TroubleshootingAccordion.tsx Accordion wrapper with telemetry Which component Situation Use --------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------ A query failed and the page/section can't render its data (the default case — most of Studio) AlertError from components/ui/AlertError The error may be a classified type with its own troubleshooting steps (e.g. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills supabase/studio-error-handling--8d5b15