UNPKG

@nevis-security/nevis-mobile-authentication-sdk-react

Version:

React Native plugin for Nevis Mobile Authentication SDK. Supports only mobile.

22 lines (20 loc) 930 B
"use strict"; /** * Copyright © 2024 Nevis Security AG. All rights reserved. */ import { PasswordEnrollmentCustomValidationError } from './PasswordEnrollmentCustomValidationError'; import { ErrorConverter } from '../../ErrorConverter'; var PasswordEnrollmentErrorType = /*#__PURE__*/function (PasswordEnrollmentErrorType) { PasswordEnrollmentErrorType[PasswordEnrollmentErrorType["CustomValidationError"] = 0] = "CustomValidationError"; return PasswordEnrollmentErrorType; }(PasswordEnrollmentErrorType || {}); export class PasswordEnrollmentErrorConverter extends ErrorConverter { convert() { const subtype = PasswordEnrollmentErrorType[this.error.type]; switch (subtype) { case PasswordEnrollmentErrorType.CustomValidationError: return new PasswordEnrollmentCustomValidationError(this.error.description, this.error.cause); } } } //# sourceMappingURL=PasswordEnrollmentErrorConverter.js.map