From 390538824c2602261fed57bd581b8f54d753de7d Mon Sep 17 00:00:00 2001 From: Eddy Chen <89349085+ecxyzzy@users.noreply.github.com> Date: Mon, 5 Feb 2024 11:12:51 -0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E2=99=BB=EF=B8=8F=20add=20detailed?= =?UTF-8?q?=20error=20message=20for=20refined=20type?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/api/src/routes/v1/rest/enrollmentHistory/schema.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/api/src/routes/v1/rest/enrollmentHistory/schema.ts b/apps/api/src/routes/v1/rest/enrollmentHistory/schema.ts index f8ed9acf..b79560da 100644 --- a/apps/api/src/routes/v1/rest/enrollmentHistory/schema.ts +++ b/apps/api/src/routes/v1/rest/enrollmentHistory/schema.ts @@ -25,6 +25,10 @@ export const QuerySchema = z (x.department && x.courseNumber) || (x.sectionCode && x.year && x.quarter) || (x.instructor && x.courseNumber && x.year && x.quarter), + { + message: + "Must provide department and course number; section code and year/quarter; or instructor, course number, and year/quarter", + }, ); export type Query = z.infer;