Skip to content

FileMiddleware and 404 responses #592

@adam-fowler

Description

@adam-fowler

Currently the FileMiddleware runs whenever the router throws a 404 HTTPError. It does not run if a Response is returned whose status is 404.

Should we consider a returned 404 responses as a reason to kick off the FileMiddleware? On one hand a returned response could be considered as already handled and therefore we shouldn't kick off the FileMiddleware. On the other people have been caught out by this.

Options:

  • Treat 404 responses the same as errors.
  • Add an option to treat 404 responses the same as errors.
  • Improve documentation.

@tib

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