Skip to content

feat: error suggestions and docs link - #94

Merged
yusukebe merged 1 commit into
nextfrom
feat/error-suggestions
Aug 19, 2026
Merged

feat: error suggestions and docs link#94
yusukebe merged 1 commit into
nextfrom
feat/error-suggestions

Conversation

@yusukebe

Copy link
Copy Markdown
Member

Improve the error contract (part of #77). hint (one string) becomes suggestions (an array of next actions to try in order), plus an optional docs link to a hono.dev page. The page is fetchable with Accept: text/markdown, so an agent can go from a failure straight to the right document.

{
  "ok": false,
  "error": {
    "code": "ENTRY_NOT_FOUND",
    "message": "Entry file missing.ts does not exist",
    "suggestions": [
      "Pass the entry file: hono build src/app.ts",
      "Default candidates are src/index.ts, src/index.tsx, src/index.js, and src/index.jsx"
    ]
  }
}

Breaking within next only — 0.2 is not released yet.

The author should do the following, if applicable

  • Add tests
  • Run tests
  • pnpm run format:fix && pnpm run lint:fix to format the code
  • Add TSDoc/JSDoc to document the code

@yusukebe
yusukebe merged commit 8054f36 into next Aug 19, 2026
4 checks passed
@yusukebe
yusukebe deleted the feat/error-suggestions branch August 19, 2026 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant