@@ -79,11 +79,15 @@ void TConfigsManager::ValidateMainConfig(TUpdateConfigOpContext& opCtx) {
7979 auto resolved = NYamlConfig::ResolveAll (tree);
8080
8181 if (ClusterName != opCtx.Cluster ) {
82- ythrow yexception () << " ClusterName mismatch" ;
82+ ythrow yexception () << " ClusterName mismatch"
83+ << " expected " << ClusterName
84+ << " but got " << opCtx.Cluster ;
8385 }
8486
8587 if (opCtx.Version != YamlVersion) {
86- ythrow yexception () << " Version mismatch" ;
88+ ythrow yexception () << " Version mismatch"
89+ << " expected " << YamlVersion
90+ << " but got " << opCtx.Version ;
8791 }
8892
8993 TSimpleSharedPtr<NYamlConfig::TBasicUnknownFieldsCollector> unknownFieldsCollector = new NYamlConfig::TBasicUnknownFieldsCollector;
@@ -1073,11 +1077,15 @@ void TConfigsManager::Handle(TEvConsole::TEvAddVolatileConfigRequest::TPtr &ev,
10731077 }
10741078
10751079 if (ClusterName != clusterName) {
1076- ythrow yexception () << " ClusterName mismatch" ;
1080+ ythrow yexception () << " ClusterName mismatch"
1081+ << " expected " << ClusterName
1082+ << " but got " << clusterName;
10771083 }
10781084
10791085 if (YamlVersion != version) {
1080- ythrow yexception () << " Version mismatch" ;
1086+ ythrow yexception () << " Version mismatch"
1087+ << " expected " << YamlVersion
1088+ << " but got " << version;
10811089 }
10821090
10831091 VolatileYamlConfigs.try_emplace (id, cfg);
@@ -1108,11 +1116,15 @@ void TConfigsManager::Handle(TEvConsole::TEvRemoveVolatileConfigRequest::TPtr &e
11081116 try {
11091117 if (!rec.force ()) {
11101118 if (ClusterName != rec.identity ().cluster ()) {
1111- ythrow yexception () << " ClusterName mismatch" ;
1119+ ythrow yexception () << " ClusterName mismatch"
1120+ << " expected " << ClusterName
1121+ << " but got " << rec.identity ().cluster ();
11121122 }
11131123
11141124 if (YamlVersion != rec.identity ().version ()) {
1115- ythrow yexception () << " Version mismatch" ;
1125+ ythrow yexception () << " Version mismatch"
1126+ << " expected " << YamlVersion
1127+ << " but got " << rec.identity ().version ();
11161128 }
11171129 }
11181130
0 commit comments