Skip to content

Commit

Permalink
handle type of error in frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
canjalal committed Oct 22, 2024
1 parent c50c293 commit 2cdc802
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/benchmarks/BenchmarkAssignmentModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ export const BenchmarkAssignmentModal = (
} catch (err) {
// TODO: issue #450
console.log(err);
setErrorMessage(err.message as string);
if (err instanceof Error) {
setErrorMessage(err.message);
}
}
}
};
Expand Down

0 comments on commit 2cdc802

Please sign in to comment.