Catch encoding/decoding exceptions to JSON/XML body.