Skip to content

Option to avoid leaking exception messages in the response body #98

Description

@davidor

When the application raises an exception, Falcon returns the message of the exception in the response body. I think it would be great to introduce a flag to disable this. In development environments seeing the exception message can be helpful. However, in a production environment, we might want to show a generic error message instead.

Puma has an option to do this: https://github.com/puma/puma/blob/6baa4d8e1c88f2e4db2918df48416a5c49feec40/lib/puma/server.rb#L919

Is there a way to do this in Falcon? I have not found anything in the docs. If there isn't a way to do this, @ioquatix would you be open to introduce this feature? I'm happy to help.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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