@@ -79,11 +79,15 @@ void TConfigsManager::ValidateMainConfig(TUpdateConfigOpContext& opCtx) {
79
79
auto resolved = NYamlConfig::ResolveAll (tree);
80
80
81
81
if (ClusterName != opCtx.Cluster ) {
82
- ythrow yexception () << " ClusterName mismatch" ;
82
+ ythrow yexception () << " ClusterName mismatch"
83
+ << " expected " << ClusterName
84
+ << " but got " << opCtx.Cluster ;
83
85
}
84
86
85
87
if (opCtx.Version != YamlVersion) {
86
- ythrow yexception () << " Version mismatch" ;
88
+ ythrow yexception () << " Version mismatch"
89
+ << " expected " << YamlVersion
90
+ << " but got " << opCtx.Version ;
87
91
}
88
92
89
93
TSimpleSharedPtr<NYamlConfig::TBasicUnknownFieldsCollector> unknownFieldsCollector = new NYamlConfig::TBasicUnknownFieldsCollector;
@@ -1073,11 +1077,15 @@ void TConfigsManager::Handle(TEvConsole::TEvAddVolatileConfigRequest::TPtr &ev,
1073
1077
}
1074
1078
1075
1079
if (ClusterName != clusterName) {
1076
- ythrow yexception () << " ClusterName mismatch" ;
1080
+ ythrow yexception () << " ClusterName mismatch"
1081
+ << " expected " << ClusterName
1082
+ << " but got " << clusterName;
1077
1083
}
1078
1084
1079
1085
if (YamlVersion != version) {
1080
- ythrow yexception () << " Version mismatch" ;
1086
+ ythrow yexception () << " Version mismatch"
1087
+ << " expected " << YamlVersion
1088
+ << " but got " << version;
1081
1089
}
1082
1090
1083
1091
VolatileYamlConfigs.try_emplace (id, cfg);
@@ -1108,11 +1116,15 @@ void TConfigsManager::Handle(TEvConsole::TEvRemoveVolatileConfigRequest::TPtr &e
1108
1116
try {
1109
1117
if (!rec.force ()) {
1110
1118
if (ClusterName != rec.identity ().cluster ()) {
1111
- ythrow yexception () << " ClusterName mismatch" ;
1119
+ ythrow yexception () << " ClusterName mismatch"
1120
+ << " expected " << ClusterName
1121
+ << " but got " << rec.identity ().cluster ();
1112
1122
}
1113
1123
1114
1124
if (YamlVersion != rec.identity ().version ()) {
1115
- ythrow yexception () << " Version mismatch" ;
1125
+ ythrow yexception () << " Version mismatch"
1126
+ << " expected " << YamlVersion
1127
+ << " but got " << rec.identity ().version ();
1116
1128
}
1117
1129
}
1118
1130
0 commit comments