Skip to content

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

@LauraBeatris

Description

@LauraBeatris

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?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions