Skip to content

Middleware loggers unaware about rescue_from handlers #1734

Closed
@thedarkside

Description

@thedarkside

As far as i digged in the code it seems that loggers realized as middleware are not aware of changes to exceptions made by rescue_from handlers.

I stumbled upon this as i saw log entries with a wrong statuscode in my application. I am catching an UnauthorizedException in a rescue_from block and setting the desired statuscode with error! e, 401. It works as expected but produces a 500 log entry.

Maybe worth a discussion about possible solutions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions