From 26b927544d2de7e42c26237c5a0af36f6ab23d08 Mon Sep 17 00:00:00 2001 From: Clivern Date: Tue, 27 Jul 2021 20:07:36 +0200 Subject: [PATCH] fix --- core/controller/reverse_proxy.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/core/controller/reverse_proxy.go b/core/controller/reverse_proxy.go index 2470447..8963eea 100644 --- a/core/controller/reverse_proxy.go +++ b/core/controller/reverse_proxy.go @@ -120,7 +120,15 @@ func ReverseProxy(c echo.Context, gc *GlobalContext) error { } // Redirect The Request to The Upstream - balancer, _ := gc.GetBalancer() + balancer, err := gc.GetBalancer() + + if err != nil { + log.WithFields(log.Fields{ + "error": err.Error(), + }).Error(`Internal server error`) + + return c.NoContent(http.StatusInternalServerError) + } remote := router.BuildRemote( balancer[endpoint.Name].Next().URL,