better handle RPC failures