/** All the known error codes for APIs that can be sent back from all APIs */ export declare enum RPC_ERROR_CODES { ACCOUNT_EXISTS = "account-exists", ERROR = "error", ROUTE_NOT_FOUND = "route-not-found", VALIDATION = "validation", INSUFFICIENT_BALANCE = "insufficient-balance", UNAUTHENTICATED = "unauthenticated", NOT_FOUND = "not-found", IDENTITY_NOT_FOUND = "identity-not-found", DUPLICATE_ACCOUNT_NAME = "duplicate-account-name", DUPLICATE_IDENTITY_NAME = "duplicate-identity-name", IMPORT_ACCOUNT_NAME_REQUIRED = "import-account-name-required", MULTISIG_SECRET_NOT_FOUND = "multisig-secret-not-found", WALLET_ALREADY_DECRYPTED = "wallet-already-decrypted", WALLET_ALREADY_ENCRYPTED = "wallet-already-encrypted" } /** * Thrown by any part of the RPC server side networking stack to * indicate that the request should be ended and an error should be * sent back to the client. Any implementer of {@link IAdapter} should * catch this before feeding the {@link Request} into the {@link Router}, * handle it, and render a response to the requester appropriately. * * @note Look at the {@link IPCAdapter} implementation for an example */ export declare class RpcResponseError extends Error { name: string; status: number; code: string; error: Error | null; constructor(message: string, code?: string, status?: number); constructor(error: Error, code?: string, status?: number); } /** * A convenience error to throw inside of routes when you want to indicate * a 400 error to the user based on validation */ export declare class RpcValidationError extends RpcResponseError { constructor(message: string, status?: number, code?: RPC_ERROR_CODES); } /** * A convenience error to throw inside of routes when a resource is not found */ export declare class RpcNotFoundError extends RpcResponseError { constructor(message: string, status?: number, code?: RPC_ERROR_CODES); } //# sourceMappingURL=errors.d.ts.map