Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

Commit

Permalink
chore: 🔧 prettier error message on parse fail
Browse files Browse the repository at this point in the history
  • Loading branch information
ecxyzzy committed Feb 2, 2024
1 parent 4b1b7f9 commit faa9eb4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion apps/api/src/routes/v1/rest/enrollmentHistory/+endpoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ export const GET = createHandler(async (event, context, res) => {

const maybeParsed = QuerySchema.safeParse(query);
if (!maybeParsed.success) {
return res.createErrorResult(400, maybeParsed.error, requestId);
return res.createErrorResult(
400,
maybeParsed.error.issues.map((issue) => issue.message).join("; "),
requestId,
);
}
const {
data: { instructor, ...data },
Expand Down

0 comments on commit faa9eb4

Please sign in to comment.