Skip to main content

error-handling

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

Informations de source

Dépôt
alchemyplatform/aa-sdk
Dernière activité de la source
21 mai 2026 à 23:38
Langue détectée de SKILL.md
anglais
Étoiles
322
Forks
235

Options d'installation

Le prompt qui vérifie d'abord la source est sélectionné par défaut. Vous pouvez passer à une commande directe ou télécharger une copie locale.

Vérifiez les fichiers source

Lisez SKILL.md et les fichiers associés affichés par SkillsMP avant de décider de l'installer.

Explorateur de fichiers
4 fichiers

Affichage de SKILL.md

SKILL.md
Instructions source · Aperçu en lecture seule
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`.
Voir sur GitHub