Skip to content

Commit

Permalink
minor: fix potential null pointer exception
Browse files Browse the repository at this point in the history
  • Loading branch information
matteonardelli committed May 8, 2024
1 parent fd1b8fc commit 8562b8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/fc/function_composition.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ func (fc *FunctionComposition) Exists() bool {
if !found {
// cache miss
f, err := getFCFromEtcd(fc.Name)
if err.Error() == fmt.Sprintf("failed to retrieve value for key %s", getEtcdKey(fc.Name)) {
if err != nil && err.Error() == fmt.Sprintf("failed to retrieve value for key %s", getEtcdKey(fc.Name)) {
return false
} else if err != nil {
log.Error(err.Error())
Expand Down

0 comments on commit 8562b8e

Please sign in to comment.