Skip to content

Commit 9cd84e8

Browse files
committed
Make wrap-exceptions middleware robust against nil response body
Fixes #766
1 parent a109c08 commit 9cd84e8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/aleph/http/client_middleware.clj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,12 @@
276276
(str "status: " status)
277277
(assoc rsp :body (ByteArrayInputStream. body))))))
278278

279+
(nil? body)
280+
(d/error-deferred
281+
(ex-info
282+
(str "status: " status)
283+
rsp))
284+
279285
:else
280286
(d/chain'
281287
(s/reduce conj [] body)

0 commit comments

Comments
 (0)