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 authored and schmichael committed May 14, 2021
1 parent 413763f commit 05a3d94
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 @@ -346,7 +346,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 05a3d94

Please sign in to comment.