Skip to content

Commit

Permalink
added some minor changes for to handle the error
Browse files Browse the repository at this point in the history
Signed-off-by: Vinay Sharma <vsharma@chef.io>
  • Loading branch information
vinay033 committed Dec 14, 2021
1 parent 85e8463 commit a86fae5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions components/automate-gateway/handler/infra_proxy/servers.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,10 @@ func (a *InfraProxyServer) ValidateWebuiKey(ctx context.Context, r *gwreq.Valida

res, err := a.client.ValidateWebuiKey(ctx, req)
if err != nil {
log.Warnf("Validate webui key error:: %s", err.Error())
return nil, err
return &gwres.ValidateWebuiKey{
Valid: false,
Error: err.Error(),
}, nil
}
return &gwres.ValidateWebuiKey{
Valid: res.Valid,
Expand Down

0 comments on commit a86fae5

Please sign in to comment.