UNPKG

kotanipay-sdk

Version:

Official Kotani Pay SDK for Node.js and Browser

27 lines 955 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.AuthenticationError = exports.ValidationError = exports.KotaniPayError = void 0; class KotaniPayError extends Error { constructor(message, statusCode = 500, errorCode) { super(message); this.statusCode = statusCode; this.errorCode = errorCode; this.name = 'KotaniPayError'; } } exports.KotaniPayError = KotaniPayError; class ValidationError extends KotaniPayError { constructor(message) { super(message, 400, 'VALIDATION_ERROR'); this.name = 'ValidationError'; } } exports.ValidationError = ValidationError; class AuthenticationError extends KotaniPayError { constructor(message = 'Authentication failed') { super(message, 401, 'AUTHENTICATION_ERROR'); this.name = 'AuthenticationError'; } } exports.AuthenticationError = AuthenticationError; //# sourceMappingURL=error.types.js.map