added error handling to bitmex fix #611

[ci skip]
This tag has no release notes.