Improve error messages for PostCSS etc.

Fixes #9730
This commit is contained in:
Bjørn Erik Pedersen
2023-07-17 19:15:48 +02:00
parent c406fd3a0e
commit 387c5f60f9
7 changed files with 61 additions and 7 deletions

View File

@@ -449,7 +449,7 @@ func (r *resourceAdapter) transform(publish, setContent bool) error {
newErr := func(err error) error {
msg := fmt.Sprintf("%s: failed to transform %q (%s)", strings.ToUpper(tr.Key().Name), tctx.InPath, tctx.InMediaType.Type)
if err == herrors.ErrFeatureNotAvailable {
if herrors.IsFeatureNotAvailableError(err) {
var errMsg string
if tr.Key().Name == "postcss" {
// This transformation is not available in this