check body.error in callback