The underlying implementation for types is https://github.com/zclconf/go-cty, which can panic when resolving values. The api surface of preview should be safe from panics, using recover() as a safe guard from any bugs/mistakes.
It is possible to avoid all panics with proper type checking, however a recover() guard rail ensure bugs do not completely kill the caller.
This should be done by early-access.
The underlying implementation for types is https://github.com/zclconf/go-cty, which can panic when resolving values. The api surface of
previewshould be safe from panics, usingrecover()as a safe guard from any bugs/mistakes.It is possible to avoid all panics with proper type checking, however a
recover()guard rail ensure bugs do not completely kill the caller.This should be done by early-access.