Pass connection error to on_reply function

* Avoid function_clause error, let the user chose what to do with them