Install any skill in seconds. Free to start, no credit card required.
Get Started Free →ledgerhq/errors
How to define and check error classes in Ledger Live. Read when adding a new error, creating an errors.ts file, or checking an error's type.
Passed 20 of 22 test cases with the skill, and 8 of 22 without it.
and 12 more in the full report
12 fixed8 passed either way2 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 12 test cases the skill fixed. Same model, same prompt, with and without the skill.
In `@ledgerhq/network-client`, create an error class `HttpApiError` that accepts a message string and an optional HTTP status code number, storing status as a readonly property.
| Checked | Without skill | With skill |
|---|---|---|
| Declares a readonly status: number | undefined property on the class. | Passed | Passed |
| Sets override name = "HttpApiError" on the class. | Missed | Passed |
The instructions your model reads when the skill loads.
Each package owns its errors in its own src/errors.ts, as plain native classes.
There is no shared errors lib: the former @ledgerhq/errors package has been removed.
A package groups its errors in src/errors.ts. Extend Error directly and set a
stable name. The name string is the contract — keep it stable, it is what
survives across process/serialization boundaries.
// message-only
export class FooNotFound extends Error {
override name = "FooNotFound";
}
// with a default message
export class InvalidChallenge extends Error {
override name = "InvalidChallenge";
constructor() {
super("backend returned an invalid challenge");
}
}
// with extra fields
export class HttpError extends Error {
override name = "HttpError";
readonly status: number | undefined;
constructor(message: string, status?: number) {
super(message);
this.status = status;
}
}
Group a family under a per-package base class so callers can catch the whole set:
export class WalletAuthError extends Error {
test cases passed, vs 8 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.