Skip to content

NotFoundHandler can't write 404 status code and message #3

@tietang

Description

@tietang

func NotFoundHandler(ctx *routing.Context) error {
ctx.WriteString("Not Found:" + strconv.Itoa(http.StatusNotFound))
ctx.Response.SetStatusCode(http.StatusNotFound)
return routing.NewHTTPError(http.StatusNotFound)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions