Add error message for onConnect