sync-request-curl
Version:
Fast way to send synchronous web requests in NodeJS. API is a subset of sync-request. Leverages node-libcurl for high performance. Cannot be used in a browser.
1 lines • 847 B
Source Map (JSON)
{"version":3,"file":"errors-BS3se1ZO.cjs","names":[],"sources":["../src/errors.ts"],"sourcesContent":["export class CurlError extends Error {\n // https://curl.se/libcurl/c/libcurl-errors.html\n code: number;\n constructor(code: number, message: string) {\n super(message);\n if (code < 1 || code > 99) {\n throw new Error(`\n CurlError code must be between 1 and 99. Given: ${code}.\n \n Please take a look at the resource below for valid Libcurl errors:\n - https://curl.se/libcurl/c/libcurl-errors.html\n `);\n }\n this.code = code;\n Object.setPrototypeOf(this, CurlError.prototype);\n }\n}\n"],"mappings":"AAAA,IAAa,EAAb,MAAa,UAAkB,KAAM,CAGnC,YAAY,EAAc,EAAiB,CAEzC,GADA,MAAM,EAAQ,CACV,EAAO,GAAK,EAAO,GACrB,MAAU,MAAM;0DACoC,EAAK;;;;QAIvD,CAEJ,KAAK,KAAO,EACZ,OAAO,eAAe,KAAM,EAAU,UAAU"}