Skip to content

Commit

Permalink
Ensure we fail if a offer is not found for RemoveOfferOperation.
Browse files Browse the repository at this point in the history
Otherwise we end up panicing later on a nil pointer.
  • Loading branch information
hmlanigan committed Mar 14, 2022
1 parent eb7d9fd commit bab28b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion state/applicationoffers.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func (s *applicationOffers) RemoveOfferOperation(offerName string, force bool) (

// Any proxies for applications on the consuming side also need to be removed.
offer, err := offerStore.ApplicationOffer(offerName)
if err != nil && !errors.IsNotFound(err) {
if err != nil {
return nil, errors.Trace(err)
}
var associatedAppProxies []*DestroyRemoteApplicationOperation
Expand Down

0 comments on commit bab28b2

Please sign in to comment.