Prevent an exception if score cannot be sent for survey

This commit is contained in:
Sebastian Serth
2023-10-08 14:02:52 +02:00
committed by Sebastian Serth
parent f7e3979e79
commit e91b2ede7d

View File

@ -83,7 +83,7 @@ class SessionsController < ApplicationController
lti_parameters = params.slice(*Lti::SESSION_PARAMETERS).permit!.to_h
provider = build_tool_provider(consumer: current_user.consumer, parameters: lti_parameters)
provider.post_replace_result!(1.0)
rescue IMS::LTI::XMLParseError, Net::OpenTimeout, Net::ReadTimeout, Errno::ECONNRESET, SocketError, EOFError
rescue IMS::LTI::InvalidLTIConfigError, IMS::LTI::XMLParseError, Net::OpenTimeout, Net::ReadTimeout, Errno::ECONNRESET, SocketError, EOFError
# We don't do anything here because it is only a bonus point and we want the users to do the survey
end
end