rpc: Add a simple failure reporting framework