Skip to content

Commit

Permalink
refactor: embed zod object in error msg
Browse files Browse the repository at this point in the history
  • Loading branch information
bholmesdev committed May 13, 2024
1 parent 00a41ca commit 50dea22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/astro/src/actions/runtime/virtual/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export class ActionInputError<T extends ErrorInferenceObject> extends ActionErro
fields: z.ZodError<T>['formErrors']['fieldErrors'];

constructor(issues: z.ZodIssue[]) {
super({ message: 'Failed to validate', code: 'BAD_REQUEST' });
super({ message: `Failed to validate: ${JSON.stringify(issues, null, 2)}`, code: 'BAD_REQUEST' });
this.issues = issues;
this.fields = {};
for (const issue of issues) {
Expand Down

0 comments on commit 50dea22

Please sign in to comment.