Skip to content

Commit

Permalink
Merge pull request #10075 from mr-karan/fix/parse_service
Browse files Browse the repository at this point in the history
fix: parse_service: return err instead of panic
  • Loading branch information
shoenig committed Feb 24, 2021
2 parents 6fc62aa + 1d2ba0e commit 3621f38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jobspec/parse_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ func parseGatewayProxy(o *ast.ObjectItem) (*api.ConsulGatewayProxy, error) {

var bind api.ConsulGatewayBindAddress
if err := hcl.DecodeObject(&bind, listenerListVal); err != nil {
panic(err)
return nil, fmt.Errorf("port: should be an int")
}
bind.Name = listenerName
proxy.EnvoyGatewayBindAddresses[listenerName] = &bind
Expand Down

0 comments on commit 3621f38

Please sign in to comment.