Fix error callback in test