Return error on RPC call
Removed panics