Skip to content

404 does not pass through formatter #388

@sinantaifour

Description

@sinantaifour

Since Rack::Mount::RouteSet is used for routing before any middleware is run, if a route does not exist RouteSet generates the 404, and it never passes through a formatter.

This behavior might be undesirable if the client expects all responses to follow the correct format.

As a temporary hack, I running a middleware before the subclass of Grape::API, that invokes methods from Grape::Middleware::Error if a 404 is returned.

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