From d8c8030ce822703db60a7de0e8580991736c2be9 Mon Sep 17 00:00:00 2001 From: Felisia Martini Date: Wed, 11 Sep 2024 10:34:33 +0100 Subject: [PATCH] Undo little changes bind to keep the PR more focused --- brokerapi/broker/bind.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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) }