Skip to content

Commit

Permalink
Change log warning to returning an error instead, when building bundl…
Browse files Browse the repository at this point in the history
…e fails due to JSON parsing
  • Loading branch information
anicr7 committed Feb 1, 2022
1 parent 37ea507 commit 711c075
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions xds/internal/xdsclient/bootstrap/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,7 @@ func (sc *ServerConfig) UnmarshalJSON(data []byte) error {
}
bundle, err := c.Build(cc.Config)
if err != nil {
logger.Warningf("Failed to build credentials bundle for %q, error: %v", cc.Type, err)
continue
return fmt.Errorf("failed to build credentials bundle from bootstrap for %q, error: %v", cc.Type, err)
}
sc.Creds = grpc.WithCredentialsBundle(bundle)
break
Expand Down

0 comments on commit 711c075

Please sign in to comment.