fix(web): correctement render erreur d'accès au serveur API
This commit is contained in:
parent
244276905b
commit
0321b1b2a0
1 changed files with 5 additions and 1 deletions
6
cmd.go
6
cmd.go
|
@ -163,7 +163,11 @@ var webCmd = &cobra.Command{
|
|||
e.GET("/", func(c echo.Context) error {
|
||||
pingResult, err := apiClient.GetHealth()
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
return c.Render(
|
||||
http.StatusOK,
|
||||
"index-html",
|
||||
voki.MessageResponse{Message: fmt.Sprintf("impossible d'accéder au serveur API: %s", err)},
|
||||
)
|
||||
}
|
||||
|
||||
return c.Render(
|
||||
|
|
Loading…
Reference in a new issue