Skip to content

Commit

Permalink
Grades error does not fail search (#766)
Browse files Browse the repository at this point in the history
  • Loading branch information
MinhxNguyen7 authored Oct 31, 2023
1 parent b247050 commit 533fa53
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,12 @@ export default function CourseRenderPane(props: { id?: number }) {
websocQueryParams.units.includes(',')
? WebSOC.queryMultiple(websocQueryParams, 'units')
: WebSOC.query(websocQueryParams),
Grades.populateGradesCache(gradesQueryParams),
// Catch the error here so that the course pane still loads even if the grades cache fails to populate
Grades.populateGradesCache(gradesQueryParams)
.catch((error) => {
console.error(error);
openSnackbar('error', 'Error loading grades information');
}),
]);

setError(false);
Expand Down

0 comments on commit 533fa53

Please sign in to comment.