@fingerprintjs/fingerprintjs-pro-react-native
Version:
Official React Native client for Fingerprint. Best identification solution for React Native.
84 lines • 4.87 kB
JavaScript
/**
FingerprintJS Pro React Native v3.14.0 - Copyright (c) FingerprintJS, Inc, 2026 (https://fingerprint.com)
Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.
*/
;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var unwrapError_web_exports = {};
__export(unwrapError_web_exports, {
unwrapError: () => unwrapError
});
module.exports = __toCommonJS(unwrapError_web_exports);
var import_errors = require("./errors");
var import_fingerprintjs_pro_spa = require("@fingerprintjs/fingerprintjs-pro-spa");
function unwrapError(error) {
switch (error.message) {
// Api Errors block
case import_fingerprintjs_pro_spa.FingerprintJSPro.ERROR_API_KEY_MISSING:
return new import_errors.ApiKeyRequiredError(error.message);
case import_fingerprintjs_pro_spa.FingerprintJSPro.ERROR_API_KEY_INVALID:
return new import_errors.ApiKeyNotFoundError(error.message);
case import_fingerprintjs_pro_spa.FingerprintJSPro.ERROR_API_KEY_EXPIRED:
return new import_errors.ApiKeyExpiredError(error.message);
case import_fingerprintjs_pro_spa.FingerprintJSPro.ERROR_BAD_REQUEST_FORMAT:
return new import_errors.RequestCannotBeParsedError(error.message);
case import_fingerprintjs_pro_spa.FingerprintJSPro.ERROR_GENERAL_SERVER_FAILURE:
return new import_errors.FailedError(error.message);
case import_fingerprintjs_pro_spa.FingerprintJSPro.ERROR_SERVER_TIMEOUT:
return new import_errors.RequestTimeoutError(error.message);
case import_fingerprintjs_pro_spa.FingerprintJSPro.ERROR_RATE_LIMIT:
return new import_errors.TooManyRequestError(error.message);
case import_fingerprintjs_pro_spa.FingerprintJSPro.ERROR_FORBIDDEN_ORIGIN:
return new import_errors.OriginNotAvailableError(error.message);
case import_fingerprintjs_pro_spa.FingerprintJSPro.ERROR_FORBIDDEN_HEADER:
return new import_errors.HeaderRestrictedError(error.message);
case import_fingerprintjs_pro_spa.FingerprintJSPro.ERROR_FORBIDDEN_ENDPOINT:
return new import_errors.HostnameRestrictedError(error.message);
case import_fingerprintjs_pro_spa.FingerprintJSPro.ERROR_WRONG_REGION:
return new import_errors.WrongRegionError(error.message);
case import_fingerprintjs_pro_spa.FingerprintJSPro.ERROR_SUBSCRIPTION_NOT_ACTIVE:
return new import_errors.SubscriptionNotActiveError(error.message);
case import_fingerprintjs_pro_spa.FingerprintJSPro.ERROR_UNSUPPORTED_VERSION:
return new import_errors.UnsupportedVersionError(error.message);
case import_fingerprintjs_pro_spa.FingerprintJSPro.ERROR_INSTALLATION_METHOD_RESTRICTED:
return new import_errors.InstallationMethodRestrictedError(error.message);
case import_fingerprintjs_pro_spa.FingerprintJSPro.ERROR_BAD_RESPONSE_FORMAT:
return new import_errors.ResponseCannotBeParsedError(error.message);
// end of API Errors block
case import_fingerprintjs_pro_spa.FingerprintJSPro.ERROR_CLIENT_TIMEOUT:
return new import_errors.ClientTimeoutError(error.message);
case import_fingerprintjs_pro_spa.FingerprintJSPro.ERROR_NETWORK_CONNECTION:
case import_fingerprintjs_pro_spa.FingerprintJSPro.ERROR_NETWORK_ABORT:
case import_fingerprintjs_pro_spa.FingerprintJSPro.ERROR_NETWORK_RESTRICTED:
return new import_errors.NetworkError(error.message);
case import_fingerprintjs_pro_spa.FingerprintJSPro.ERROR_INVALID_PROXY_INTEGRATION_HEADERS:
return new import_errors.InvalidProxyIntegrationHeadersError(error.message);
case import_fingerprintjs_pro_spa.FingerprintJSPro.ERROR_PROXY_INTEGRATION_SECRET_ENVIRONMENT_MISMATCH:
return new import_errors.ProxyIntegrationSecretEnvironmentMismatch(error.message);
case import_fingerprintjs_pro_spa.FingerprintJSPro.ERROR_INVALID_PROXY_INTEGRATION_SECRET:
return new import_errors.InvalidProxyIntegrationSecretError(error.message);
default:
return new import_errors.UnknownError(error.message);
}
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
unwrapError
});
//# sourceMappingURL=unwrapError.web.js.map