diff options
Diffstat (limited to 'src/encoding/json/v2/errors.go')
| -rw-r--r-- | src/encoding/json/v2/errors.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/encoding/json/v2/errors.go b/src/encoding/json/v2/errors.go index 4895386fe2..da50bc30fc 100644 --- a/src/encoding/json/v2/errors.go +++ b/src/encoding/json/v2/errors.go @@ -299,6 +299,13 @@ func collapseSemanticErrors(err error) error { return err } +func wrapErrUnsupported(err error, what string) error { + if errors.Is(err, errors.ErrUnsupported) { + return errors.New(what + " may not return errors.ErrUnsupported") + } + return err +} + // errorModalVerb is a modal verb like "cannot" or "unable to". // // Once per process, Hyrum-proof the error message by deliberately |
