Make two ErrorCode functions generic.
fixup! Make RPC::Ledger generic.