expose the JSON-RPC error code in the exception message (partially
fixes #47)