Log an exception when an RPC error occurs, to cue observers in on where the issue might lie.
It would be better in future to decode these properly and return a meaningful error message in a well-formed JSON reply, but for now this is at least better than claiming that all errors are RPC format problems.
I have avoided returning valid JSON in case it causes us to leak security-sensitive data to callers.
Log an exception when an RPC error occurs, to cue observers in on where the issue might lie. It would be better in future to decode these properly and return a meaningful error message in a well-formed JSON reply, but for now this is at least better than claiming that all errors are RPC format problems. I have avoided returning valid JSON in case it causes us to leak security-sensitive data to callers.