distribute has error and success callback