Fix error handling on object storage service enablement (#165)
* Fix error handling on objecto storage service enablement * Add message about depends_on * Update docs
This commit is contained in:
parent
35275fd336
commit
506d1afdc2
5 changed files with 9 additions and 9 deletions
|
|
@ -186,7 +186,7 @@ func (r *credentialResource) Create(ctx context.Context, req resource.CreateRequ
|
|||
|
||||
// Handle project init
|
||||
err := enableProject(ctx, &model, r.client)
|
||||
if resp.Diagnostics.HasError() {
|
||||
if err != nil {
|
||||
core.LogAndAddError(ctx, &resp.Diagnostics, "Error creating credential", fmt.Sprintf("Enabling object storage project before creation: %v", err))
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue