body response returns error in case of failure