Skip to content

Comments

Report handlers via error handler instead of console#951

Merged
chvp merged 1 commit intomainfrom
fix/report-errors-via-error-handler
Jan 8, 2026
Merged

Report handlers via error handler instead of console#951
chvp merged 1 commit intomainfrom
fix/report-errors-via-error-handler

Conversation

@chvp
Copy link
Member

@chvp chvp commented Jan 8, 2026

We got some reports mentioning an alert cause by errors here. Instead of logging details in the console we should send them to sentry (which is handled on the Dodona side).

I checked for other uses of console.log or console.error. There were no occurrences except for in Logging.ts, but that is not actually sent any error events. It's hard to get the error handler there, so I just left it as is.

@chvp chvp requested review from TomNaessens and Copilot January 8, 2026 14:47
@chvp chvp self-assigned this Jan 8, 2026
@chvp chvp added the chore Repository/build/dependency maintenance label Jan 8, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves error reporting by routing errors to Sentry instead of logging them to the console. The changes replace console logging with calls to an error handler that can be configured via setErrorHandler().

Key Changes

  • Added error capturing in the previously empty catch block when launching the runner
  • Replaced console.error with errorHandler call when service worker registration fails
  • Both error handlers now create Error objects with cause chaining for better error context

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@chvp chvp merged commit b0fb513 into main Jan 8, 2026
12 checks passed
@chvp chvp deleted the fix/report-errors-via-error-handler branch January 8, 2026 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Repository/build/dependency maintenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants