httparty icon indicating copy to clipboard operation
httparty copied to clipboard

Handle invalid JSON in Response#inspect

Open henrik opened this issue 6 years ago • 1 comments
trafficstars

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?

henrik avatar Jul 08 '19 11:07 henrik

Thanks for the pr! I'll take a closer look at in the weeked and get back to you

TheSmartnik avatar Jul 08 '19 17:07 TheSmartnik

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.

jnunemaker avatar Mar 20 '24 12:03 jnunemaker