From a5da7d1f8463ebfc18611320528419a51fb3108e Mon Sep 17 00:00:00 2001 From: Sebastian Serth Date: Wed, 31 Aug 2022 13:50:07 +0200 Subject: [PATCH] Remove outdated HTTP status codes See https://github.com/openHPI/codeocean/pull/1349#pullrequestreview-1091652523 --- lib/runner/strategy/poseidon.rb | 5 ----- spec/lib/runner/strategy/poseidon_spec.rb | 1 - 2 files changed, 6 deletions(-) diff --git a/lib/runner/strategy/poseidon.rb b/lib/runner/strategy/poseidon.rb index a5214059..3c8626f0 100644 --- a/lib/runner/strategy/poseidon.rb +++ b/lib/runner/strategy/poseidon.rb @@ -34,8 +34,6 @@ class Runner::Strategy::Poseidon < Runner::Strategy else execution_environments end - when 404 - raise Runner::Error::EnvironmentNotFound.new else handle_error response end @@ -258,9 +256,6 @@ class Runner::Strategy::Poseidon < Runner::Strategy response_body = self.class.parse response websocket_url = response_body[:websocketUrl] websocket_url.presence || raise(Runner::Error::UnexpectedResponse.new('Poseidon did not send a WebSocket URL')) - when 400 - Runner.destroy(@allocation_id) - self.class.handle_error response else self.class.handle_error response end diff --git a/spec/lib/runner/strategy/poseidon_spec.rb b/spec/lib/runner/strategy/poseidon_spec.rb index bdf7fc56..66e368ce 100644 --- a/spec/lib/runner/strategy/poseidon_spec.rb +++ b/spec/lib/runner/strategy/poseidon_spec.rb @@ -291,7 +291,6 @@ describe Runner::Strategy::Poseidon do end include_examples 'BadRequest (400) error handling' - include_examples 'BadRequest (400) destroys local runner' include_examples 'Unauthorized (401) error handling' include_examples 'Gone (410) error handling' include_examples 'InternalServerError (500) error handling'