Liking cljdoc? Tell your friends :D

clojure-commons.exception


as-de-exception-handlerclj

(as-de-exception-handler error-handler error-code)

Wraps a compojure-api exception handler function and performs the following tasks;

  • creates an exception map from the wrapped function's response
  • json encodes the exception map into the response body
  • adds json headers to response map

This function expects the error-handler to return a ring response with a ':errors' subkey in the response ':body'

Wraps a compojure-api exception handler function and performs
the following tasks;
  - creates an exception map from the wrapped function's response
  - json encodes the exception map into the response body
  - adds json headers to response map

This function expects the error-handler to return a ring response with
a ':errors' subkey in the response ':body'
sourceraw docstring

authentication-not-found-handlerclj

source

bad-query-params-handlerclj

source

bad-request-field-handlerclj

source

bad-request-handlerclj

source

default-error-handlerclj

(default-error-handler response-fn error-code & [header-map])

Produces an error handler which generates exceptions with the given error-code and HTTP response function.

Produces an error handler which generates exceptions with the
given error-code and HTTP response function.
sourceraw docstring

exception-handlersclj

source

failed-dependency-handlerclj

source

forbidden-handlerclj

source

handle-request-validation-errorsclj

source

handle-response-validation-errorsclj

source

illegal-argument-handlerclj

source

internal-system-error-handlerclj

source

invalid-cfg-handlerclj

source

invalid-json-handlerclj

source

item-exists-handlerclj

source

missing-query-params-handlerclj

source

missing-request-field-handlerclj

source

not-a-user-handlerclj

source

not-authorized-handlerclj

source

not-found-handlerclj

source

not-owner-handlerclj

source

not-unique-handlerclj

source

not-writeable-handlerclj

source

request-failed-handlerclj

source

temporary-redirect-handlerclj

(temporary-redirect-handler error error-type request)

Specialized exception handler for 302 responses. This could not be accomplished with the default exception handler because best practices for 302 responses is an empty response body.

Specialized exception handler for 302 responses. This could not be accomplished with the default
exception handler because best practices for 302 responses is an empty response body.
sourceraw docstring

unavailable-handlerclj

source

unchecked-handlerclj

(unchecked-handler error error-type request)
source

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

× close