httparty
httparty copied to clipboard
Handle invalid JSON in Response#inspect
See #421.
There are a few things I'm unsure about here, but see it at a starting point for a discussion:
-
Can this happen for other formats than JSON as well, and do we want to handle those? (Personally I'd be happy with this one for now, and we can support more as the need arises.)
-
Since this is not a very integrated test, I'm not super confident about whether this will work as intended IRL. Is there a better place or way I could test it? Or does this seem a reasonable way to test it?
Thanks for the pr! I'll take a closer look at in the weeked and get back to you
Closing as stale.
Maybe a reasonable middle ground would be to make it non-JSON-specific by having a blanket rescue like you suggest.
I'm 👍 to this if you or anyone wants to tackle it. Sorry this dropped off my radar for so long.