Skip to content

Set Type in the ErrorModel #307

@victoraugustolls

Description

@victoraugustolls

Right now, I see no way to directly set the Type of the error as the interface StatusError doesn't include a method, and huma.NewError also doesn't accept a type parameter! Maybe there is something obvious that I'm missing, but right now, I'm passing a custom error type to NewError just to set this field!

@danielgtaylor WDYT of maybe creating a NewErrorWithType or adding a method for StatusError to set the type?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions