Skip to content

Commit 5213de0

Browse files
committed
chore: add ValidationError usage rule to AGENTS.md
1 parent dd9c5de commit 5213de0

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,7 @@ bun --hot ./index.ts
103103
```
104104

105105
For more information, read the Bun API docs in `node_modules/bun-types/docs/**.mdx`.
106+
107+
## Error Handling
108+
109+
If a validation error is needed (user-correctable input problem), use `ValidationError` directly. Do not create subclasses like `MissingCodeDirectoryError extends ValidationError` — just throw `new ValidationError("code directory not found: ...")` with a descriptive message.

0 commit comments

Comments
 (0)