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

Better error message on invalid @derive Jason.Encoder options #183

Open
LauraBeatris opened this issue Feb 10, 2024 · 1 comment · May be fixed by #196
Open

Better error message on invalid @derive Jason.Encoder options #183

LauraBeatris opened this issue Feb 10, 2024 · 1 comment · May be fixed by #196

Comments

@LauraBeatris
Copy link

Current behavior

When passing an invalid option, eg:

@derive {Jason.Encoder, invalid: [:__meta__]}

It returns the following error: cannot encode metadata from the :__meta__ field for CrosswordsApi.Users.User to JSON.

Expected behavior

Could the error be explicit that expect or only should be passed as valid options only?

@michalmuskala
Copy link
Owner

Yes, that makes sense. PRs welcome!

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

Successfully merging a pull request may close this issue.

2 participants