Repository navigation
Conversation
Look up the error code in a vendored slice of supabase.com/kb/error-links.json in the shared error normalization. Text output prints a "Learn more: <url>" line after the error and JSON output adds a docUrl field to the error object, only when the code has an article. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The raw query path dropped the driver error code, so db query failures could not reach the troubleshooting link lookup. Carry the code on the execution error and on the db query error that wraps it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 of 2 tasks
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important
Draft for experimentation & demo. Not ready to review or merge.
Summary
What. When an error has a known code with a troubleshooting article on supabase.com/kb, the text output prints a
Learn more: <url>line after the error. The JSON and stream-json output adderror.docUrl. When no article exists, the output does not change. Existing messages and fields stay the same.Why. Agents read the CLI JSON errors. With
docUrl, an agent can follow the link to the fix instead of guessing.How.
docUrlfield.codeon the error and on itscausechain.(SQLSTATE X), a failed SASL or SCRAM exchange (mapped to 28P01), andstatus 403:(mapped to 403).Learn more: <url>last. The JSON and stream-json output putdocUrlin the error object.db querypreviously dropped the driver error code on the raw query path.queryRawnow keeps the SQLSTATE onDbExecError, and thedb queryerror that wraps it carries the same code. Without this fix, a Postgres server error fromdb querycould not reach the lookup.The vendored slice.
apps/cli/src/shared/output/error-links.jsonis theclislice of theerrorsfrontmatter insupabase/troubleshooting. That data is to be published at https://supabase.com/kb/error-links.json. It is not live yet. For now the slice is hand-vendored. The scriptrefresh:error-linksfetches the published file, so it fails until the file is live. A knipjqignore covers the script.Linked issue
open-for-contributionlabel (or I'm a Supabase maintainer).Supabase team member; the work is tracked in Linear.
Known limits
UNABLE_TO_VERIFY_LEAF_SIGNATUREand the Management API 403 are covered by unit tests only. I could not reproduce them locally.Open questions for reviewers
Learn morewording. I kept it for now. Other wording is under discussion.docUrl.Checklist
fix(cli): …).pnpm check:allpasses; relevant package tests pass for every touched workspace, andpnpm types:checkpasses for each touched TypeScript workspace (or workspace declaring it).🤖 Generated with Claude Code