Skip to content

BindUnmarshaler should include the field name in error messages #4296

Open
@mukunda-

Description

@mukunda-

Hi, little issue here when writing custom unmarshalling interfaces.

I have a simple interface that binds UUID types. I noticed that when an error occurs during parsing, the error message in the response just includes the raw error text and no mention of the field name. As a user, receiving an error text without the actual field name can be very confusing.

There's no access to the field name in the UnmarshalParam implementation, and it seems quite nontrivial to otherwise insert the field name that is erroring. We could use a level of convenience on top of this, either automatically including the field name in the error response, or letting us have easier access to it during unmarshalling.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions