Skip to content

proposal: allow net/http server to fail on panic instead of recovering #16542

Closed
@HasAusten

Description

@HasAusten

I would like to have the ability to turn off net/http server's current behavior to recover on panic.

My proposal is to add a new package variable http.ServerRecoverOnPanic that has a default value of True which is then checked in server.go before the recover is issued. By making the default value of http.ServerRecoverOnPanic True, the current behavior to recover would be maintained for backwards compatibility.

It is my feeling that the software designer should be able to determine when, and when not to recover from a panic, to allow for existing tools like supervisord to handle service crashes and to provide visibility and notification when a panic occurs.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions