fixing error when there is a content type mismatch in http request