CrossClj

0.4.0 docs

SourceDocs



RECENT
    VARS
    coerce-error-handler
    create-muuntaja
    handle-req-error
    missing-route-handler
    request-parsing-handler
    request-validation-handler
    response-validation-handler
    safe-handler
    stringify
    wrap-exceptions
    wrap-keyword-keys
    wrap-not-found

    « Index of all namespaces of this project

    (coerce-error-handler f)
    (create-muuntaja options)
    Private
    (handle-req-error e _ _)
    Private
    (request-parsing-handler ex _ _)
    Private
    (safe-handler e _ _)
    Prints stacktrace to console and returns safe error response.
    Error response only contains class of the Exception so that it won't accidentally
    expose secret details.
    (stringify error)
    Stringifies symbols and validation errors in Schema error, keeping the structure intact.
    
    (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
    (wrap-keyword-keys handler path)
    (wrap-not-found handler f)