Added onSuccess and onError and onWarning callbacks