UNPKG

filecoin-pin

Version:

Bridge IPFS content to Filecoin Onchain Cloud using familiar tools

18 lines 524 B
/** * Safely extracts an error message from an unknown error value. * * @param error - The error value to extract a message from * @returns The error message string, or 'Unknown error' if the error type cannot be determined * * @example * ```typescript * try { * // some operation * } catch (error) { * const message = getErrorMessage(error) * logger.error(`Operation failed: ${message}`) * } * ``` */ export declare function getErrorMessage(error: unknown): string; //# sourceMappingURL=errors.d.ts.map