UNPKG

node-csfd-api

Version:

ČSFD API in JavaScript. Amazing NPM library for scrapping csfd.cz :)

24 lines (23 loc) 723 B
const require_vars = require("./vars.cjs"); //#region src/errors.ts /** * Raised when a page cannot be retrieved. `reason` says why, so callers can * tell "this movie does not exist" from "ČSFD is refusing us right now" and * react differently instead of guessing from a message. */ var CsfdError = class extends Error { reason; url; /** HTTP status, when the request got far enough to have one. */ status; constructor(reason, url, message, options) { super(`${require_vars.LIB_PREFIX} ${message}`, { cause: options?.cause }); this.name = "CsfdError"; this.reason = reason; this.url = url; this.status = options?.status; } }; //#endregion exports.CsfdError = CsfdError; //# sourceMappingURL=errors.cjs.map