From 394385098dac71360a707b8bda5b56b3f3087c35 Mon Sep 17 00:00:00 2001 From: Sebastian Serth Date: Wed, 1 Dec 2021 15:10:47 +0100 Subject: [PATCH] Rescue Faraday::ConnectionFailed for Poseidon --- lib/runner/strategy/poseidon.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/runner/strategy/poseidon.rb b/lib/runner/strategy/poseidon.rb index ac7f4f8b..879aa7d3 100644 --- a/lib/runner/strategy/poseidon.rb +++ b/lib/runner/strategy/poseidon.rb @@ -127,6 +127,9 @@ class Runner::Strategy::Poseidon < Runner::Strategy Runner.destroy(@allocation_id) if response.status == 400 self.class.handle_error response + rescue Faraday::ConnectionFailed + # TODO: Remove fix after the following issue is resolved: https://github.com/openHPI/poseidon/issues/54 + raise Runner::Error::RunnerNotFound.new rescue Faraday::Error => e raise Runner::Error::FaradayError.new("Request to Poseidon failed: #{e.inspect}") ensure