mirage / ocaml-github

GitHub APIv3 OCaml bindings
ISC License
100 stars 61 forks source link

Monad.run prints to stderr in case of error #233

Closed emillon closed 4 years ago

emillon commented 4 years ago

Hi,

I was trying to catch errors from Monad.run but it seems that in addition to returning the error, it always prints it to stderr:

https://github.com/mirage/ocaml-github/blob/ec6a253166307ce45cd86b065a1a00cf02136f04/lib/github_core.ml#L536-L537

A way to silence it (or remove it) would be great.

Thanks!

avsm commented 4 years ago

Given the error is returned in the monad, there's no need to print it as well. A PR just removing it would be fine by me.

emillon commented 4 years ago

Yes, that's what I thought. I'll do that.