mirror of
https://github.com/penpot/penpot.git
synced 2025-01-09 08:20:45 -05:00
✨ Add better error reporting on response encoding middleware
This commit is contained in:
parent
fed31d366f
commit
9334f935eb
3 changed files with 10 additions and 4 deletions
|
@ -71,7 +71,7 @@ penpot - error report v2 {{id}}
|
||||||
|
|
||||||
{% if value %}
|
{% if value %}
|
||||||
<div class="table-row multiline">
|
<div class="table-row multiline">
|
||||||
<div id="value" class="table-key">VALIDATION VALUE: </div>
|
<div id="value" class="table-key">VALUE: </div>
|
||||||
<div class="table-val">
|
<div class="table-val">
|
||||||
<pre>{{value}}</pre>
|
<pre>{{value}}</pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -118,7 +118,9 @@
|
||||||
(t/write! tw data)))
|
(t/write! tw data)))
|
||||||
(catch java.io.IOException _)
|
(catch java.io.IOException _)
|
||||||
(catch Throwable cause
|
(catch Throwable cause
|
||||||
(l/error :hint "unexpected error on encoding response" :cause cause))
|
(binding [l/*context* {:value data}]
|
||||||
|
(l/error :hint "unexpected error on encoding response"
|
||||||
|
:cause cause)))
|
||||||
(finally
|
(finally
|
||||||
(.close ^OutputStream output-stream))))))
|
(.close ^OutputStream output-stream))))))
|
||||||
|
|
||||||
|
@ -131,8 +133,9 @@
|
||||||
|
|
||||||
(catch java.io.IOException _)
|
(catch java.io.IOException _)
|
||||||
(catch Throwable cause
|
(catch Throwable cause
|
||||||
(l/error :hint "unexpected error on encoding response"
|
(binding [l/*context* {:value data}]
|
||||||
:cause cause))
|
(l/error :hint "unexpected error on encoding response"
|
||||||
|
:cause cause)))
|
||||||
(finally
|
(finally
|
||||||
(.close ^OutputStream output-stream))))))
|
(.close ^OutputStream output-stream))))))
|
||||||
|
|
||||||
|
|
|
@ -58,6 +58,9 @@
|
||||||
(when-let [params (:request/params context)]
|
(when-let [params (:request/params context)]
|
||||||
{:params (pp/pprint-str params :width 200)})
|
{:params (pp/pprint-str params :width 200)})
|
||||||
|
|
||||||
|
(when-let [value (:value context)]
|
||||||
|
{:value (pp/pprint-str value :width 200 :length 50 :level 10)})
|
||||||
|
|
||||||
(when-let [data (some-> data (dissoc ::s/problems ::s/value ::s/spec ::sm/explain :hint))]
|
(when-let [data (some-> data (dissoc ::s/problems ::s/value ::s/spec ::sm/explain :hint))]
|
||||||
{:data (pp/pprint-str data :width 200)})
|
{:data (pp/pprint-str data :width 200)})
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue