Capture exception for Scoring

Previously, an exception was caused by the tubesock gem but not sent to Sentry. This caused errors not to bubble up correctly but rather kill the current thread, leaving the user with a generic "WebSocket connection not established" message.

Probably, this should be removed when updating the WebSocket implementation.
This commit is contained in:
Sebastian Serth
2022-12-23 13:04:28 +01:00
parent a9c8eb23b8
commit 6a942ccf50

View File

@ -248,6 +248,11 @@ class SubmissionsController < ApplicationController
Rails.logger.debug { "Runner error while scoring submission #{@submission.id}: #{e.message}" }
@testrun[:passed] = false
save_testrun_output 'assess'
rescue StandardError => e
Sentry.capture_exception(e)
raise e
ensure
ActiveRecord::Base.connection_pool.release_connection
end
end
end