allow construction to not pass an onError handler.