removing error callbacks, implementing error events