Skip to content

Schema::Attribute::TypeError message should include the Schema class #21

Description

@aaronjensen

This is very helpful for more deeply nested schemas where it isn't clear which class is having its type check violated. Without it, the stacktrace and message provide little guidance, especially if there are multiple objects with the same attribute name.

Something like:

raise Schema::Attribute::TypeError, "#{val.inspect} of type #{val.class.name} cannot be assigned to attribute #{attribute_name.inspect} of type #{type.name} in #{self.name} (Strict: #{strict.inspect})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions