Skip to content

Internal: Better logging and error handling for BullMQ jobs

Compare
Choose a tag to compare
@valtterikantanen valtterikantanen released this 04 Jul 13:53
· 1249 commits to master since this release

If an error occurred during faculty or study programme refresh jobs, those errors were never sent to Sentry, only logged. This was because everything was inside try … catch statements, so from BullMQ’s point of view those errors never happened and the jobs were completed successfully.

API routes for updating those stats still use try … catch statements so there are no changes in their behavior (except correct HTTP status codes are now used instead of 200 if there’s an error).

Now we also get information about how long it took to complete a job in the logs.