Added onError hook to Relaxation