com-lihaoyi / cask

Cask: a Scala HTTP micro-framework. Cask makes it easy to set up a website, backend server, or REST API using Scala
https://com-lihaoyi.github.io/cask/
Other
525 stars 55 forks source link

Pass request to error handlers #133

Closed jodersky closed 2 months ago

jodersky commented 2 months ago

This allows customizing error responses based on data available in requests.

One scenario would be to display a 404, but with additional context information, e.g. the path or login status of the user taken from cookies.