fix nested try/catch and reconnect on unknown error