error needs to be send in the RPC method