mirror of
https://github.com/penpot/penpot.git
synced 2025-05-10 20:56:38 +02:00
✨ Emit warning when an error is raised on formating body.
This commit is contained in:
parent
a633ed3c9a
commit
4c851856ff
1 changed files with 7 additions and 3 deletions
|
@ -86,9 +86,13 @@
|
||||||
(reify rp/StreamableResponseBody
|
(reify rp/StreamableResponseBody
|
||||||
(write-body-to-stream [_ _ output-stream]
|
(write-body-to-stream [_ _ output-stream]
|
||||||
;; Use the same buffer as jetty output buffer size
|
;; Use the same buffer as jetty output buffer size
|
||||||
(with-open [bos (buffered-output-stream output-stream buffer-size)]
|
(try
|
||||||
(let [tw (t/writer bos opts)]
|
(with-open [bos (buffered-output-stream output-stream buffer-size)]
|
||||||
(t/write! tw data))))))
|
(let [tw (t/writer bos opts)]
|
||||||
|
(t/write! tw data)))
|
||||||
|
(catch Throwable cause
|
||||||
|
(l/warn :hint "unexpected error on encoding response"
|
||||||
|
:cause cause))))))
|
||||||
|
|
||||||
(defn- impl-format-response-body
|
(defn- impl-format-response-body
|
||||||
[response {:keys [query-params] :as request}]
|
[response {:keys [query-params] :as request}]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue