Skip to content

Commit

Permalink
helper/schema: Prevented panics during error to diagnostic conversion (
Browse files Browse the repository at this point in the history
…#914)

Reference: #789
  • Loading branch information
bflad committed Mar 28, 2022
1 parent a0d2e21 commit ab84f8b
Show file tree
Hide file tree
Showing 4 changed files with 129 additions and 96 deletions.
7 changes: 7 additions & 0 deletions .changelog/914.txt
@@ -0,0 +1,7 @@
```release-note:bug
helper/schema: Prevented panics during `error` to diagnostic conversion for a non-`nil` error with an `Error()` method that returns an empty string (`""`)
```

```release-note:note
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.
```

0 comments on commit ab84f8b

Please sign in to comment.