Skip to content

Make error a predefined variable for later comparision #24

@rskumar

Description

@rskumar

err = errors.New("render: unable to automatically decode the request content type")

If the returned error are defined var, it would be possible to compare and know what exactly happened. The error message from render package cannot be directly to client in most cases, but application developer would like to return some custom error.

var (
    ErrContentTypeNotSet = errors.New("render: missing content-type, unable to automatically decode the request content") 
)

would be helpful.

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