Liking cljdoc? Tell your friends :D

compojure.api.exception


http-response-handlerclj

(http-response-handler _ {:keys [response]} _)

reads response from ex-data :response

reads response from ex-data :response
sourceraw docstring

mapped-exception-typesclj

source

request-parsing-handlerclj

(request-parsing-handler ex data req)
source

request-validation-handlerclj

(request-validation-handler e data req)

Creates error response based on Schema error. The following keys are available:

:type type of the exception (::request-validation) :coercion coercion instance used :value value that was validated :in location of the value (e.g. [:request :query-params]) :schema schema to be validated against :error schema error :request raw request

Creates error response based on Schema error. The following keys are available:

:type            type of the exception (::request-validation)
:coercion        coercion instance used
:value           value that was validated
:in              location of the value (e.g. [:request :query-params])
:schema          schema to be validated against
:error           schema error
:request         raw request
sourceraw docstring

response-validation-handlerclj

(response-validation-handler e data req)

Creates error response based on a response error. The following keys are available:

:type type of the exception (::response-validation) :coercion coercion instance used :in location of the value ([:response :body]) :schema schema to be validated against :error schema error :request raw request :response raw response

Creates error response based on a response error. The following keys are available:

:type            type of the exception (::response-validation)
:coercion        coercion instance used
:in              location of the value ([:response :body])
:schema          schema to be validated against
:error           schema error
:request         raw request
:response        raw response
sourceraw docstring

safe-handlerclj

(safe-handler e data req)

Writes :error to log with the exception message & stacktrace.

Error response only contains class of the Exception so that it won't accidentally expose secret details.

Writes :error to log with the exception message & stacktrace.

Error response only contains class of the Exception so that it won't accidentally
expose secret details.
sourceraw docstring

schema-error-handlerclj

(schema-error-handler e data req)

Creates error response based on Schema error.

Creates error response based on Schema error.
sourceraw docstring

with-loggingclj

(with-logging handler)
(with-logging handler log-level)

Wrap compojure-api exception-handler a function which will log the exception message and stack-trace with given log-level.

Wrap compojure-api exception-handler a function which will log the
exception message and stack-trace with given log-level.
sourceraw docstring

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

× close