Updates onError method to take the same input as regular usage as per issue #7
v0.4.2