The added test hopefully reveals the issue - prior to this fix,
that err := f.Get(...) -> errors.Is(err, ...) check passed, because
the error value was not ever encoded into a *GenericError.
Thankfully this was only a test environment bug, and a user discovered
it due to writing tests.
The non-test behavior can be seen split between these two locations:
... which also show incorrect / pointless string/byte conversions.
I've left comments there just to prevent confusion, but these fields are
probably worth changing at some point.
The added test hopefully reveals the issue - prior to this fix, that
err := f.Get(...)
->errors.Is(err, ...)
check passed, because the error value was not ever encoded into a*GenericError
.Thankfully this was only a test environment bug, and a user discovered it due to writing tests.
The non-test behavior can be seen split between these two locations:
... which also show incorrect / pointless string/byte conversions. I've left comments there just to prevent confusion, but these fields are probably worth changing at some point.