Skip to content

Commit

Permalink
hook an error logging for 404 course
Browse files Browse the repository at this point in the history
  • Loading branch information
saengowp committed Sep 2, 2023
1 parent bfb8827 commit 914e395
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion apps/api/src/course/course.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class CourseService {
})

if (!course) {
throw new NotFoundError("Can't find a course with the given parameters")
throw new NotFoundError(`Can't find a course with the given parameters ${JSON.stringify({courseNo, semester, academicYear, studyProgram})}`)
}
return course
}
Expand Down
1 change: 1 addition & 0 deletions apps/web/src/modules/CourseDetail/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ export async function getServerSideProps(
}
} catch (e) {
if (e instanceof ApolloError) {
console.warn(`CourseDetail not found query=${JSON.stringify(context.query)}`, e)
return {
notFound: true,
}
Expand Down

0 comments on commit 914e395

Please sign in to comment.