pub(crate) fn handle_command_status(status: Result<i32, Error>) -> i32