Skip to main content

error-handling

Use when throwing, catching, wrapping, documenting, or testing runtime errors in aa-sdk packages.

来源信息

仓库
alchemyplatform/aa-sdk
最近来源活动
2026年5月21日 23:38
检测到的 SKILL.md 语言
英语
星标
323
Forks
235

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

文件资源管理器
4 个文件

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
error-handling
description
Use when throwing, catching, wrapping, documenting, or testing runtime errors in aa-sdk packages.
last_verified
2026-05-06T00:00:00.000Z
# Error Handling Runtime package errors should use the SDK error hierarchy rooted at `@alchemy/common` `BaseError`. ## Rules | Rule | When to read | | ----------------------------------------- | ----------------------------------------------- | | [BaseError](rules/base-error.md) | Before adding package runtime errors. | | [No plain Error](rules/no-plain-error.md) | Before writing throw statements in `packages/`. | | [Raise footgun](rules/raise-footgun.md) | Before using or modifying `raise`. | ## Evidence - `packages/common/src/errors/BaseError.ts` extends viem's `BaseError`. - `.eslintrc` forbids `throw new Error(...)` in `packages/**/*` except tests. - `.eslintrc` forbids `import { BaseError } from "viem"` to prevent accidentally using viem's `BaseError` instead of `@alchemy/common`'s. - `packages/wallet-apis/src/utils/schema.ts` wraps Zod validation failures in `@alchemy/common` `BaseError`.
在 GitHub 查看