revise RPCError

currently RPCError is plain StandardError, it would parse the parameter
to string, thus what we get in rescue clause is a string like
"{ \"code\" => -17, \"message\" => \"...\"}", it would be verbose to
extract the error code