Added an RPC response factory method

Added an RPC error enum type
Changed RPC exceptions to be associated with enum type
Not really a good exception message.