remove second definition of `proto.onError`
Merge pull request #20 from Raynos/patch-1

remove second definition of `proto.onError`