Skip to content

Commit

Permalink
Quick fix #1146 (#1147)
Browse files Browse the repository at this point in the history
Try to add request-text to error message on failed request.
  • Loading branch information
fare authored Mar 4, 2024
1 parent 137ae6b commit d9c691b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/std/net/request.ss
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,8 @@
(try
(if (eq? req.status 200)
(&request-content req)
(error "HTTP request failed" req.status req.status-text))
(error "HTTP request failed"
req.status req.status-text (ignore-errors (request-text req))))
(finally
(&request-close req)))))

Expand Down

0 comments on commit d9c691b

Please sign in to comment.