Add error callbacks.