Make parse exception handling more robust

Prevents obscure error messages about assoc requiring integers in cases where
the response body is not a map.