Skip to content

Commit

Permalink
Grades error does not fail search
Browse files Browse the repository at this point in the history
  • Loading branch information
MinhxNguyen7 authored Oct 27, 2023
1 parent 98b511a commit 09f10cb
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 09f10cb

Please sign in to comment.