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\" => \"...\"}", but not a Hash.

after this patch applied, it would easier to extract the error code.