@cf-wasm/og
Version:
Generate Open Graph Images dynamically from HTML/CSS without a browser.
1 lines • 1 kB
Source Map (JSON)
{"version":3,"file":"errors.cjs","names":[],"sources":["../../src/core/errors.ts"],"sourcesContent":["/**\n * An interface representing the options for constructing {@link FetchError}\n */\nexport interface FetchErrorOptions extends ErrorOptions {\n\t/**\n\t * The `Response` object if applicable\n\t */\n\tresponse?: Response;\n}\n\n/**\n * Represents a Error ocurred while fetching\n */\nexport class FetchError extends Error {\n\tname = 'FetchError';\n\n\t/**\n\t * The response object for which fetch failed if provided\n\t */\n\tresponse: Response | undefined;\n\n\t/**\n\t * Creates an instance of {@link FetchError}\n\t *\n\t * @param message The error message\n\t * @param options The {@link FetchErrorOptions}\n\t */\n\tconstructor(message: string, options?: FetchErrorOptions) {\n\t\tsuper(message, options);\n\t\tthis.response = options?.response;\n\t}\n}\n"],"mappings":";;;;AAaA,IAAa,aAAb,cAAgC,MAAM;;;;;;;CAcrC,YAAY,SAAiB,SAA6B;EACzD,MAAM,SAAS,OAAO;cAdhB;EAeN,KAAK,WAAW,SAAS;CAC1B;AACD"}