Expose fields (or add access methods) of MessageNotFoundErr
stephenafamo opened this issue · comments
Stephen Afam-Osemene commented
With errors.As
, it is now possible to detect the error, but since the fields are private, there is no way to extract the structured details without resorting to string parsing.
Nick Snyder commented
What is your use case for wanting access to the underlying fields?
Stephen Afam-Osemene commented
For now, I am doing structured logging and would prefer to have the language and message key as fields.
In the future, I intend to send custom alerts to ease the translation flow.
Stephen Afam-Osemene commented
Any intention of exposing this? 🙏🏾
Nick Snyder commented
I don't have a strong objection. If you want to open a PR I will review it.