diff --git a/brokerapi/broker/bind.go b/brokerapi/broker/bind.go index f9a7f8de8..550c27204 100644 --- a/brokerapi/broker/bind.go +++ b/brokerapi/broker/bind.go @@ -69,7 +69,7 @@ func (broker *ServiceBroker) Bind(ctx context.Context, instanceID, bindingID str } // Give the user a better error message if they give us a bad request - if err = validateBindParameters(parsedDetails.RequestParams, serviceDefinition.BindInputVariables); err != nil { + if err := validateBindParameters(parsedDetails.RequestParams, serviceDefinition.BindInputVariables); err != nil { return domain.Binding{}, err } @@ -94,7 +94,7 @@ func (broker *ServiceBroker) Bind(ctx context.Context, instanceID, bindingID str Credentials: credsDetails, } - if err = broker.store.CreateServiceBindingCredentials(newCreds); err != nil { + if err := broker.store.CreateServiceBindingCredentials(newCreds); err != nil { return domain.Binding{}, fmt.Errorf("error saving credentials to database: %w. WARNING: these credentials cannot be unbound through cf. Please contact your operator for cleanup", err) } @@ -104,7 +104,7 @@ func (broker *ServiceBroker) Bind(ctx context.Context, instanceID, bindingID str RequestDetails: parsedDetails.RequestParams, } - if err = broker.store.StoreBindRequestDetails(bindRequest); err != nil { + if err := broker.store.StoreBindRequestDetails(bindRequest); err != nil { return domain.Binding{}, fmt.Errorf("error saving bind request details to database: %s. Unbind operations will not be able to complete", err) }