From c6977b6319eb43b1591635f646c05d5982b9761e Mon Sep 17 00:00:00 2001 From: Sebastian Serth Date: Thu, 13 Jul 2023 10:51:47 +0200 Subject: [PATCH] Catch `SocketError` for LTI --- app/controllers/concerns/lti.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/concerns/lti.rb b/app/controllers/concerns/lti.rb index 08a00fa6..76ed55d6 100644 --- a/app/controllers/concerns/lti.rb +++ b/app/controllers/concerns/lti.rb @@ -174,7 +174,7 @@ module Lti begin response = provider.post_replace_result!(normalized_lit_score) {code: response.response_code, message: response.post_response.body, status: response.code_major, score_sent: normalized_lit_score} - rescue IMS::LTI::XMLParseError, Net::OpenTimeout, Net::ReadTimeout, Errno::ECONNRESET + rescue IMS::LTI::XMLParseError, Net::OpenTimeout, Net::ReadTimeout, Errno::ECONNRESET, SocketError # A parsing error might happen if the LTI provider is down and doesn't return a valid XML response {status: 'error'} end