Skip to content

posthog-rails: exclude ActionDispatch::Http::MimeNegotiation::InvalidType by default #159

@moladukes

Description

@moladukes

MimeNegotiation::InvalidType is raised by Rails whenever a client sends a malformed Accept or Content-Type header. In practice this is exclusively scanner/fuzzer traffic (e.g. Accept: ../../../../etc/services{{).

Rails already maps it to a 406 Not Acceptable via ActionDispatch::ExceptionWrapper.rescue_responses, so the response is correct but posthog-rails still captures it as an exception, producing noise that's identical in spirit to the already-excluded ActionController::BadRequest / UnknownFormat / ParseError.

Proposal: add ActionDispatch::Http::MimeNegotiation::InvalidType to default_excluded_exceptions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions