@rnw-community/react-native-payments
Version:
Accept Payments with Apple Pay and Android Pay using the Payment Request API.
16 lines • 847 B
JavaScript
import { PaymentsErrorEnum } from '../enum/payments-error.enum.js';
import { PaymentsError } from './payments.error.js';
export class DOMException extends PaymentsError {
constructor(errorType) {
super(`[DOMException]: ${DOMException.messages[errorType]}`);
this.name = errorType;
}
}
DOMException.messages = {
[PaymentsErrorEnum.AbortError]: 'The operation was aborted.',
[PaymentsErrorEnum.InvalidStateError]: 'The object is in an invalid state.',
[PaymentsErrorEnum.NotAllowedError]: 'The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.',
[PaymentsErrorEnum.NotSupportedError]: 'The operation is not supported.',
[PaymentsErrorEnum.SecurityError]: 'The operation is insecure.',
};
//# sourceMappingURL=dom.exception.js.map