SAP / terraform-provider-btp

Terraform provider for SAP BTP
https://registry.terraform.io/providers/SAP/btp/latest
Apache License 2.0
89 stars 18 forks source link

fix: handling timeouts with proper error messages #924

Closed diya-dhan closed 1 month ago

diya-dhan commented 1 month ago

Purpose

fix #916

When a timeout occurs and the subscription hasn't reached the target state, the plugin would crash without providing a readable error message. While the logic for generating a relevant error is already in place, the absence of a check for "nil" responses causes the execution to terminate abruptly. This PR resolves the issue by adding the necessary check and enhancing the error message for better clarity.

Does this introduce a breaking change?

[ ] Yes
[x] No

Pull Request Type

What kind of change does this Pull Request introduce?

[x] Bugfix
[ ] Feature
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

How to Test

go test ./...

What to Check

Verify that the following are valid:

Checklist for reviewer

The following organizational tasks must be completed before merging this PR: