remove second definition of `proto.onError`

For some reason the `proto.onError` methods was defined twice.