UNPKG

chargebee

Version:

A library for integrating with Chargebee.

15 lines (14 loc) 627 B
export class ChargebeeZodValidationError extends Error { constructor(actionName, zodError) { var _a; const messages = zodError.issues .map((e) => `${e.path.join('.')}: ${e.message}`) .join('; '); super(`[Chargebee] Validation failed for '${actionName}': ${messages}`); Object.setPrototypeOf(this, new.target.prototype); this.name = 'ChargebeeZodValidationError'; this.actionName = actionName; this.zodError = zodError; (_a = Error.captureStackTrace) === null || _a === void 0 ? void 0 : _a.call(Error, this, this.constructor); } }