Update onError to be more easily parameterizable