Log failures of outbound web requests

This commit is contained in:
Tony Garnock-Jones 2016-10-30 20:30:58 -04:00
parent c9eddfa0b7
commit 4a39a03a0a
1 changed files with 3 additions and 1 deletions

View File

@ -466,7 +466,9 @@
(stop-when (message (inbound (web-raw-client-conn id $r)))
(react (stop-when (asserted (observe (web-response-complete id _ _)))
(if (exn? r)
(send! (web-response-complete id #f #f))
(begin (log-error "Outbound web request failed: ~a"
(exn->string r))
(send! (web-response-complete id #f #f)))
(send! r)))))))
(define (do-request-chunked id req body)