mirror of
https://github.com/BetterCorp/BetterFrame.git
synced 2026-05-27 00:36:34 +00:00
12 lines
No EOL
377 B
JavaScript
12 lines
No EOL
377 B
JavaScript
export class ValidationError extends Error {
|
|
issues;
|
|
constructor(issues) {
|
|
const message = issues
|
|
.map((i) => `[${i.code}] ${i.path.length > 0 ? i.path.join(".") + ": " : ""}${i.message}`)
|
|
.join("\n");
|
|
super(message);
|
|
this.name = "ValidationError";
|
|
this.issues = issues;
|
|
}
|
|
}
|
|
//# sourceMappingURL=errors.js.map
|