The onError callback