Remove error handling for fetching runner from /execute
This commit is contained in:

committed by
Jan-Eric Hellenberg

parent
ec1968ecf5
commit
035d1eb795
@ -1,7 +1,6 @@
|
|||||||
package api
|
package api
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
"gitlab.hpi.de/codeocean/codemoon/poseidon/api/dto"
|
"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 {
|
} else {
|
||||||
scheme = "ws"
|
scheme = "ws"
|
||||||
}
|
}
|
||||||
r, ok := runner.FromContext(request.Context())
|
r, _ := runner.FromContext(request.Context())
|
||||||
if !ok {
|
|
||||||
log.Error("Runner not set in request context.")
|
|
||||||
writeInternalServerError(writer, errors.New("findRunnerMiddleware failure"), dto.ErrorUnknown)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
path, err := router.Get(WebsocketPath).URL(RunnerIdKey, r.Id())
|
path, err := router.Get(WebsocketPath).URL(RunnerIdKey, r.Id())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Reference in New Issue
Block a user