UNPKG

recaptcha-node

Version:

A Node.js library to verify reCAPTCHA v2/v3 response tokens received from a client.

32 lines 1.07 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.RecaptchaInvalidRequestError = exports.RecaptchaConnectionError = exports.RecaptchaAPIError = exports.RecaptchaError = void 0; class RecaptchaError extends Error { constructor(attrs) { super(attrs.message); this.original = attrs.original; } } exports.RecaptchaError = RecaptchaError; class RecaptchaAPIError extends RecaptchaError { constructor(attrs = {}) { super(attrs); this.type = 'api-error'; } } exports.RecaptchaAPIError = RecaptchaAPIError; class RecaptchaConnectionError extends RecaptchaError { constructor(attrs = {}) { super(attrs); this.type = 'connection-error'; } } exports.RecaptchaConnectionError = RecaptchaConnectionError; class RecaptchaInvalidRequestError extends RecaptchaError { constructor(attrs = {}) { super(attrs); this.type = 'invalid-request-error'; } } exports.RecaptchaInvalidRequestError = RecaptchaInvalidRequestError; //# sourceMappingURL=errors.js.map