Liking cljdoc? Tell your friends :D

duct.middleware.web


wrap-hide-errorsclj

(wrap-hide-errors handler error-handler)

Middleware that hides any uncaught exceptions behind a 500 'Internal Error' response generated by an error handler. Intended for use in production when exception details need to be hidden.

Middleware that hides any uncaught exceptions behind a 500 'Internal Error'
response generated by an error handler. Intended for use in production when
exception details need to be hidden.
sourceraw docstring

wrap-log-errorsclj

(wrap-log-errors handler logger)

Log any exceptions with the supplied logger, then re-throw them.

Log any exceptions with the supplied logger, then re-throw them.
sourceraw docstring

wrap-log-requestsclj

(wrap-log-requests handler logger)

Log each request using the supplied logger. The logger must implement the duct.core.protocols/Logger protocol.

Log each request using the supplied logger. The logger must implement the
duct.core.protocols/Logger protocol.
sourceraw docstring

wrap-not-foundclj

(wrap-not-found handler error-handler)

Middleware that returns a 404 'Not Found' response from an error handler if the base handler returns nil.

Middleware that returns a 404 'Not Found' response from an error handler if
the base handler returns nil.
sourceraw docstring

wrap-route-aliasesclj

(wrap-route-aliases handler aliases)

Middleware that takes a map of URI aliases. If the URI of the request matches a URI in the map's keys, the URI is changed to the value corresponding to that key.

Middleware that takes a map of URI aliases. If the URI of the request matches
a URI in the map's keys, the URI is changed to the value corresponding to that
key.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close