Skip to content

Support error messages in cast_stored and dump_to_native. #365

@zachdaniel

Description

@zachdaniel

Is your feature request related to a problem? Please describe.
A problem that we encounter when using cast_stored and dump_to_native on embeds is that it can be very difficult to determine where an error occurred, because there are no error messages for those callbacks. So you could have a 6-nested embedded resource and something deep in there could fail to cast to/from the database and all you would get is :error.

Describe the solution you'd like
Support error messages in cast_stored and dump_to_native, i.e {:error, "Error message"}. This would be used in embeds to return which key specifically failed the cast.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Someday

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions