refactor(游戏分发客户端): 发布结果缺快照时区分作品与版本
- 原先作品/版本任一缺失都报同一条「游戏发布结果」,排障时分不清缺的是哪一半 - 按 (Some,None)/(None,Some)/(None,None) 三种情况给出不同文案
This commit is contained in:
@@ -741,7 +741,15 @@ impl SpacetimeClient {
|
||||
.and_then(map_game_distribution_game_result)
|
||||
.and_then(|(game, version, replayed)| match (game, version) {
|
||||
(Some(game), Some(version)) => Ok((game, version, replayed)),
|
||||
_ => Err(SpacetimeClientError::missing_snapshot("游戏发布结果")),
|
||||
(Some(_), None) => Err(SpacetimeClientError::missing_snapshot(
|
||||
"游戏发布结果缺少版本快照",
|
||||
)),
|
||||
(None, Some(_)) => Err(SpacetimeClientError::missing_snapshot(
|
||||
"游戏发布结果缺少作品快照",
|
||||
)),
|
||||
(None, None) => Err(SpacetimeClientError::missing_snapshot(
|
||||
"游戏发布结果缺少作品与版本快照",
|
||||
)),
|
||||
});
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user