mirage / ocaml-cohttp

An OCaml library for HTTP clients and servers using Lwt or Async
Other
703 stars 173 forks source link

Cohttp_lwt_xhr does not publish all exceptions into the lwt #522

Open apatil opened 7 years ago

apatil commented 7 years ago

To reproduce: clone https://gist.github.com/apatil/25ae4986bc02c2e7a6407e1655574ac3 , run make, make sure nothing is running on port 2323, and open index.html in your browser.

The example tries to send a request to a port that isn't bound. I would expect the exception handler to log an error message, but instead the success handler logs a message and I see an uncaught exception GET http://127.0.0.1:2323/ net::ERR_CONNECTION_REFUSED in the Chrome developer console.

Tested with cohttp 0.21.0.

MikkelStorgaard commented 5 years ago

Is there anything on this? I have the same problem.