Skip to content

Commit

Permalink
fix: Improved Error Handling for Entitlement Destruction (#838)
Browse files Browse the repository at this point in the history
Co-authored-by: I584814 <[email protected]>
  • Loading branch information
ANUGRAHG and diya-dhan authored Jun 19, 2024
1 parent c3c1047 commit 532ed05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/provider/resource_subaccount_entitlement.go
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ func (rs *subaccountEntitlementResource) Delete(ctx context.Context, req resourc

// No error returned even if operation failed
if entitlement.Assignment.EntityState == cis_entitlements.StateProcessingFailed {
return *entitlement, entitlement.Assignment.EntityState, errors.New("undefined API error during entitlement processing")
return *entitlement, entitlement.Assignment.EntityState, errors.New(entitlement.Assignment.StateMessage)
}

return entitlement, cis_entitlements.StateProcessing, nil
Expand Down

0 comments on commit 532ed05

Please sign in to comment.