Skip to content
This repository was archived by the owner on Aug 24, 2022. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/ring/middleware/format_response.clj
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,10 @@
+ **:handle-error** is a fn with a sig [exception request response]. Defaults
to just rethrowing the Exception"
[handler & args]
(let [{:keys [predicate encoders charset binary? handle-error]} (impl/extract-options args)
(let [{:keys [response-predicate predicate encoders charset binary? handle-error]} (impl/extract-options args)
charset (or charset default-charset-extractor)
handle-error (or handle-error default-handle-error)
predicate (or predicate serializable?)]
predicate (or response-predicate predicate serializable?)]
(fn [req]
(let [{:keys [headers body] :as response} (handler req)]
(try
Expand Down