Skip to content

Commit

Permalink
Undo little changes bind to keep the PR more focused
Browse files Browse the repository at this point in the history
  • Loading branch information
FelisiaM committed Sep 11, 2024
1 parent 3230f7c commit d8c8030
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions brokerapi/broker/bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand All @@ -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)
}
Expand All @@ -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)
}

Expand Down

0 comments on commit d8c8030

Please sign in to comment.