Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix load issue
Browse files Browse the repository at this point in the history
IsaacCalligeros95 committed Aug 11, 2024
1 parent 0ed4dd0 commit 79fbbf3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions octopusdeploy_framework/resource_tenant.go
Original file line number Diff line number Diff line change
@@ -79,7 +79,9 @@ func (r *tenantTypeResource) Read(ctx context.Context, req resource.ReadRequest,
client := r.Config.Client
tenant, err := tenants.GetByID(client, data.SpaceID.ValueString(), data.ID.ValueString())
if err != nil {
resp.Diagnostics.AddError("unable to load tenant", err.Error())
if err := errors.ProcessApiErrorV2(ctx, resp, data, err, "tenant"); err != nil {

Check failure on line 82 in octopusdeploy_framework/resource_tenant.go

GitHub Actions / build

undefined: errors
resp.Diagnostics.AddError("unable to load tenant", err.Error())
}
return
}

@@ -107,7 +109,9 @@ func (r *tenantTypeResource) Update(ctx context.Context, req resource.UpdateRequ
tenant, err := mapStateToTenant(data)
tenant.ID = state.ID.ValueString()
if err != nil {
resp.Diagnostics.AddError("unable to load tenant", err.Error())
if err := errors.ProcessApiErrorV2(ctx, resp, data, err, "tenant"); err != nil {

Check failure on line 112 in octopusdeploy_framework/resource_tenant.go

GitHub Actions / build

undefined: errors
resp.Diagnostics.AddError("unable to load tenant", err.Error())
}
return
}

0 comments on commit 79fbbf3

Please sign in to comment.