Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose fields (or add access methods) of MessageNotFoundErr #306

Closed
stephenafamo opened this issue Nov 7, 2023 · 4 comments · Fixed by #307
Closed

Expose fields (or add access methods) of MessageNotFoundErr #306

stephenafamo opened this issue Nov 7, 2023 · 4 comments · Fixed by #307

Comments

@stephenafamo
Copy link
Contributor

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.

@nicksnyder
Copy link
Owner

What is your use case for wanting access to the underlying fields?

@stephenafamo
Copy link
Contributor Author

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.

@stephenafamo
Copy link
Contributor Author

Any intention of exposing this? 🙏🏾

@nicksnyder
Copy link
Owner

I don't have a strong objection. If you want to open a PR I will review it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants