Skip to content

Commit

Permalink
fix: add stringify for response value in validation filter
Browse files Browse the repository at this point in the history
  • Loading branch information
kenso312 committed Aug 8, 2023
1 parent 9309bd2 commit dfd410a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/filter/validator-exception.filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ const getErrorMsg = (error: ValidationError) => {
}
const message = Object.values(root.constraints)[0];
return `${message}${
root.value ? ` (value: ${root.value}, type: ${typeof root.value})` : ''
root.value
? ` (value: ${JSON.stringify(root.value)}, type: ${typeof root.value})`
: ''
}`;
};

Expand Down

0 comments on commit dfd410a

Please sign in to comment.