spec for parsing error from json response