This PR prevents cases where having :as :transit+json with a non json body will silently swallow an exception and return nil. Also prevents situations where the server advertises the content-type of application/transit+json but returns an unparsable body which would also previously be silently ignored by the automatic decoding.
I've not created a corresponding issue, although happy to if it's helpful.
This PR also doesn't attempt to solve anything similar for the msgpack case where any bytes in the body can be interpreted as a sequence of values (i.e. it typically doesn't fail regardless of body contents and returns some value).
This PR prevents cases where having
:as :transit+json
with a non json body will silently swallow an exception and return nil. Also prevents situations where the server advertises the content-type of application/transit+json but returns an unparsable body which would also previously be silently ignored by the automatic decoding.I've not created a corresponding issue, although happy to if it's helpful.
This PR also doesn't attempt to solve anything similar for the msgpack case where any bytes in the body can be interpreted as a sequence of values (i.e. it typically doesn't fail regardless of body contents and returns some value).