Handle exceptions correctly
RPC