1natsu-error-handling — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited 1natsu-error-handling (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
サイレントな失敗を防ぎ、適切なエラー伝播を保証するための構造的エラーハンドリングパターン。
エラーは意味のあるハンドリングをするか、呼び出し元に伝播させなければならない。空のcatchブロックは禁止。
末端の関数(ビジネスロジック、ユーティリティ)はエラーをthrow/raiseすべき。キャッチするのはアーキテクチャの境界 — APIハンドラ、UIレイヤー、ジョブランナー、ミドルウェア — で構造的にハンドリングできる場所。
大きなブロックを1つのtryで囲むのは避ける。tryブロックは小さく保ち、エラー発生箇所を明確にする。
型/クラスでエラーの種類を区別し、ハンドラが適切に分岐できるようにする。
ロギングはオブザーバビリティ。ハンドリングはアクション(リトライ、フォールバック、ユーザー通知)。両方とも境界のハンドラで行う — 各レイヤーで console.log してre-throwしない。
finally / defer / with / using を使い、エラーパスでのリソースリークを防ぐ。
throw する。キャッチしない。async/await のエラーは必ず上流で try-catch または .catch() でハンドリングする。// BAD: 空のcatch — エラーを握りつぶしている
try {
await fetchData();
} catch (e) {}
// BAD: console.logだけ — 実際のハンドリングがない
try {
await fetchData();
} catch (e) {
console.log(e);
}
// BAD: 末端でキャッチしてデフォルト値を返す — 呼び出し元がDBエラーとデータ不在を区別できない
async function getUser(id: string) {
try {
return await db.users.findById(id);
} catch {
return null;
}
}// GOOD: 末端ではthrowし、エラーを伝播させる
async function getUser(id: string): Promise<User> {
const user = await db.users.findById(id); // DBエラーは自然に伝播
if (!user) {
throw new NotFoundError(`User not found: ${id}`);
}
return user;
}
// GOOD: 境界で集約ハンドリング
app.use((err, req, res, next) => {
if (err instanceof NotFoundError) {
return res.status(404).json({ error: err.message });
}
logger.error(err);
return res.status(500).json({ error: "Internal Server Error" });
});~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.