Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Clivern committed Sep 25, 2021
1 parent acf2e7a commit 26b9275
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion core/controller/reverse_proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 26b9275

Please sign in to comment.