fixing deserialization of bad request responses