support for new connect

They've removed code that casted everything to `Error` object.