From 035d1eb79515a43a5be8ad3e366971b473f24e58 Mon Sep 17 00:00:00 2001 From: Sebastian Serth Date: Fri, 7 May 2021 16:22:34 +0200 Subject: [PATCH] Remove error handling for fetching runner from /execute --- api/runners.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/api/runners.go b/api/runners.go index 00dddcb..c9ca6be 100644 --- a/api/runners.go +++ b/api/runners.go @@ -1,7 +1,6 @@ package api import ( - "errors" "fmt" "github.com/gorilla/mux" "gitlab.hpi.de/codeocean/codemoon/poseidon/api/dto" @@ -56,12 +55,7 @@ func executeCommand(router *mux.Router) func(w http.ResponseWriter, r *http.Requ } else { scheme = "ws" } - r, ok := runner.FromContext(request.Context()) - if !ok { - log.Error("Runner not set in request context.") - writeInternalServerError(writer, errors.New("findRunnerMiddleware failure"), dto.ErrorUnknown) - return - } + r, _ := runner.FromContext(request.Context()) path, err := router.Get(WebsocketPath).URL(RunnerIdKey, r.Id()) if err != nil {