8000 helper/schema: Prevented panics during error to diagnostic conversion… · hashicorp/terraform-plugin-sdk@ab84f8b · GitHub
[go: up one dir, main page]

8000
Skip to content

Commit ab84f8b

Browse files
authored
helper/schema: Prevented panics during error to diagnostic conversion (#914)
Reference: #789
1 parent a0d2e21 commit ab84f8b

File tree

4 files changed

+129
-96
lines changed

4 files changed

+129
-96
lines changed

.changelog/914.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
```release-note:bug
2+
helper/schema: Prevented panics during `error` to diagnostic conversion for a non-`nil` error with an `Error()` method that returns an empty string (`""`)
3+
```
4+
5+
```release-note:note
6+
helper/schema: Any returned non-`nil` `error` with an `Error()` method that returns an empty string (`""`), will now return an error diagnostic with an `"Empty Error String"` summary instead of a panic. Enabling Terraform logging at the `WARN` level (e.g. `TF_LOG=WARN terraform apply`) can help locate the problematic error by searching for the `detected empty error string` log message.
7+
```

0 commit comments

Comments
 (0)
0