UNPKG

opencage-api-client

Version:

An OpenCageData Geocoder API client library for node (ESM, CJS) and browsers (UMD)

1 lines 2.52 kB
{"version":3,"file":"errors/GeocodeError.cjs","sources":["webpack://opencage-api-client/webpack/runtime/define_property_getters","webpack://opencage-api-client/webpack/runtime/has_own_property","webpack://opencage-api-client/webpack/runtime/make_namespace_object","webpack://opencage-api-client/./src/errors/GeocodeError.ts"],"sourcesContent":["__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n * GeocodeError type\n *\n * Represents the Error Type\n */\nexport type GeocodeErrorStatus = {\n /**\n * The HTTP status code\n */\n code: number;\n /**\n * The error message\n */\n message: string;\n};\n\n/**\n * GeocodeError class\n *\n * Represents the Error Object\n */\nexport class GeocodeError extends Error {\n /**\n * The response error object or the status error object for backward compatibility\n */\n response?: Response | { status: GeocodeErrorStatus };\n /**\n * The status error object\n */\n status?: GeocodeErrorStatus;\n /**\n * Constructor for the GeocodeError class\n *\n * @param message the error message\n */\n constructor(message: string) {\n super(message);\n this.name = 'GeocodeError';\n }\n}\n"],"names":["__webpack_require__","definition","key","Object","obj","prop","Symbol","GeocodeError","Error","message"],"mappings":";;;IAAAA,oBAAoB,CAAC,GAAG,CAAC,UAASC;QACjC,IAAI,IAAIC,OAAOD,WACR,IAAGD,oBAAoB,CAAC,CAACC,YAAYC,QAAQ,CAACF,oBAAoB,CAAC,CAAC,UAASE,MACzEC,OAAO,cAAc,CAAC,UAASD,KAAK;YAAE,YAAY;YAAM,KAAKD,UAAU,CAACC,IAAI;QAAC;IAGzF;;;ICNAF,oBAAoB,CAAC,GAAG,CAACI,KAAKC,OAAUF,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAACC,KAAKC;;;ICClFL,oBAAoB,CAAC,GAAG,CAAC;QACxB,IAAG,AAAkB,eAAlB,OAAOM,UAA0BA,OAAO,WAAW,EACrDH,OAAO,cAAc,CAAC,UAASG,OAAO,WAAW,EAAE;YAAE,OAAO;QAAS;QAEtEH,OAAO,cAAc,CAAC,UAAS,cAAc;YAAE,OAAO;QAAK;IAC5D;;;;;;;ACeO,MAAMI,qBAAqBC;IAIhC,SAAqD;IAIrD,OAA4B;IAM5B,YAAYC,OAAe,CAAE;QAC3B,KAAK,CAACA;QACN,IAAI,CAAC,IAAI,GAAG;IACd;AACF"}