hashicorp / hashicorp/terraform-plugin-framework
Implement Additional Error Handling in Transform / Walk Code
- Dominant language
- Go
- Stars
- 384
- Forks
- 107
- Avg merge
- 3m
- Merged PRs (30d)
- 1
Description
### Module version
```
v1.6.0
```
### Use-cases
Similar to #933 there might be other `tftypes` package `Transform()`/`Walk()` logic which may or may not be fully handling the `error` return properly. While most of this sort of logic in the framework should be returning diagnostics to wrapping logic rather than `error` back to the `Transform()`/`Walk()` caller, there are cases where `tftypes.Value` can get errantly set, especially in the case of dynamic types.
### Proposal
Double check `Transform()`/`Walk()` for `error` return handling, including:
* `NullifyCollectionBlocks`
* `ReifyNullCollectionBlocks`
* Any others
The `error` return should be converted into a "unexpected" error diagnostic so provider developers and framework maintainers can more easily determine triage steps, rather than the potential for other unexpected behavior.
### References
- https://github.com/hashicorp/terraform-plugin-framework/pull/933#discussion_r1506750533
Contributor guide
Assessment
This issue has not been assessed yet.