CrossClj

0.26.0 docs

SourceDocs



RECENT
    VARS
    comp-mw
    default-error-handler
    get-swagger-data
    handle-exception
    set-swagger-data
    stringify-error
    wrap-swagger-data
    wrap-validation-errors

    « Index of all namespaces of this project

    (comp-mw mw & base-params)
    (default-error-handler {:keys [error]})
    (get-swagger-data request)
    Reads top-level swagger-data from request, pushed in by
    set-swagger-data.
    Private
    (handle-exception catch-core-errors? error-handler e respond raise)
    (set-swagger-data request data)(set-swagger-data request f & data)
    Sets extra top-level swagger-data into a request.
    By default, deep-merges gives data in. Data
    can be read with get-swagger-data.
    (stringify-error error)
    (wrap-swagger-data handler data)
    Middleware that adds top level swagger-data into request.
    
    (wrap-validation-errors handler & [{:keys [error-handler catch-core-errors?]}])
    Middleware that catches thrown ring-swagger validation errors turning them
    into valid error respones. Accepts the following options:
    
    :error-handler - a function of schema.utils.ErrorContainer -> response
    :catch-core-errors? - consume also :schema.core/errors (defaults to false)