diff --git a/cli/src/stake.rs b/cli/src/stake.rs index 7506f11e57..b59c86213e 100644 --- a/cli/src/stake.rs +++ b/cli/src/stake.rs @@ -597,7 +597,9 @@ pub fn process_show_stake_history( use_lamports_unit: bool, ) -> ProcessResult { let stake_history_account = rpc_client.get_account(&stake_history::id())?; - let stake_history = StakeHistory::from_account(&stake_history_account).unwrap(); + let stake_history = StakeHistory::from_account(&stake_history_account).ok_or_else(|| { + CliError::RpcRequestError("Failed to deserialize stake history".to_string()) + })?; println!(); println!(