Skip to content

Commit

Permalink
added empty policy error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
IliaRN committed Jan 28, 2022
2 parents f4279aa + d2ec147 commit 67f809d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/v11/api_v11_replication.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func GetPolicyByName(
if err != nil {
return nil, err
} else if len(p.Policy) == 0 {
return nil, fmt.Errorf("empty policy")
return nil, fmt.Errorf("successful code returned, but policy %s not found", name)
}
return &p.Policy[0], nil
}
Expand Down

0 comments on commit 67f809d

Please sign in to comment.