(stringify error)
Stringifies symbols and validation errors in Schema error, keeping the structure intact.
Stringifies symbols and validation errors in Schema error, keeping the structure intact.
(wrap-api handler)
(wrap-api handler options)
Opinionated chain of middlewares for web apis. Takes options-map to configure all the needed middlewares. See details and defaults from the source.
Accepts the following options:
:exceptions options for kekkonen.core/wrap-exceptions
:not-found a function request=>response to handle nil responses
:formats value should be :muuntaja.middleware/defaults (default), Muuntaja options map or a created Muuntaja. See Muuntaja wiki for details: https://github.com/metosin/muuntaja/wiki/Configuration
Opinionated chain of middlewares for web apis. Takes options-map to configure all the needed middlewares. See details and defaults from the source. Accepts the following options: - :exceptions options for kekkonen.core/wrap-exceptions - :handlers - map of type->exception-handler for exceptions. exception-handlers take 3 arguments: the exception, ExceptionInfo data and the originating request. tip: to catch normal Schema errors use :schema.core/error as type - :not-found a function request=>response to handle nil responses - :formats value should be :muuntaja.middleware/defaults (default), Muuntaja options map or a created Muuntaja. See Muuntaja wiki for details: https://github.com/metosin/muuntaja/wiki/Configuration
(wrap-exceptions handler {:keys [handlers default]})
Catches all exceptions and delegates to right error handler accoring to :type of Exceptions :handlers - a map from exception type to handler :default - default handler for everything no caught by handlers
Catches all exceptions and delegates to right error handler accoring to :type of Exceptions :handlers - a map from exception type to handler :default - default handler for everything no caught by handlers
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close