@helia/verified-fetch
Version:
A fetch-like API for obtaining verified & trustless IPFS content on the web
25 lines • 1.01 kB
TypeScript
import type { FatalPluginErrorOptions, PluginErrorOptions } from './types.js';
/**
* If a plugin encounters an error, it should throw an instance of this class.
*/
export declare class PluginError extends Error {
name: string;
code: string;
fatal: boolean;
details?: Record<string, any>;
response?: any;
constructor(code: string, message: string, options?: PluginErrorOptions);
}
/**
* If a plugin encounters a fatal error and verified-fetch should not continue processing the request, it should throw
* an instance of this class.
*
* Note that you should be very careful when throwing a `PluginFatalError`, as it will stop the request from being
* processed further. If you do not have a response to return to the client, you should consider throwing a
* `PluginError` instead.
*/
export declare class PluginFatalError extends PluginError {
name: string;
constructor(code: string, message: string, options: FatalPluginErrorOptions);
}
//# sourceMappingURL=errors.d.ts.map