UNPKG

kotanipay-sdk

Version:

Official Kotani Pay SDK for Node.js and Browser

21 lines 675 B
export class KotaniPayError extends Error { constructor(message, statusCode = 500, errorCode) { super(message); this.statusCode = statusCode; this.errorCode = errorCode; this.name = 'KotaniPayError'; } } export class ValidationError extends KotaniPayError { constructor(message) { super(message, 400, 'VALIDATION_ERROR'); this.name = 'ValidationError'; } } export class AuthenticationError extends KotaniPayError { constructor(message = 'Authentication failed') { super(message, 401, 'AUTHENTICATION_ERROR'); this.name = 'AuthenticationError'; } } //# sourceMappingURL=error.types.js.map