Skip to content

net/http: Custom Error handlers #10123

Closed
Closed
@mattfarina

Description

@mattfarina

In the http package Error displays just an error message. When building a web application you will often want to have style error pages matching the site or application. In order to get this with Go you need to implement your own Error handling along with any code that calls it.

For example, if you want custom error pages (including 404 not found pages) and want to serve files you need to bypass the built in file server and re-implement much of it to change the error page handling.

It would be far simpler to allow the Error to provide a default but be capable of being replaced.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions