Read the errors and receipts guide. Signatures below come from the published SDK declarations. Access SDK services through db; use their constructors only when integrating at a lower level.
ErrorCode
type ErrorCode =
| "INVALID_CONFIG"
| "INVALID_RECORD"
| "INVALID_QUERY"
| "AUTH_REQUIRED"
| "AUTH_FAILED"
| "PERMISSION_DENIED"
| "CONFLICT"
| "RELAY_ERROR"
| "PUBLISH_FAILED"
| "NOT_FOUND"
| "MULTIPLE_ROWS"
| "ABORTED"
| "CLIENT_CLOSED";
NostrbaseError
declare class NostrbaseError extends Error {}
Properties
readonly code: ErrorCode;
readonly details?: unknown | undefined;
readonly name = "NostrbaseError";
constructor
constructor(code: ErrorCode, message: string, details?: unknown | undefined);