diff --git a/core/lib/Drupal/Core/Cache/VariationCache.php b/core/lib/Drupal/Core/Cache/VariationCache.php
index c8b81ad7ee1c6e96c8a0e923c101627916e2be8c..8b49221ded2916be51331ef901655a4333da538b 100644
--- a/core/lib/Drupal/Core/Cache/VariationCache.php
+++ b/core/lib/Drupal/Core/Cache/VariationCache.php
@@ -136,7 +136,8 @@ public function set(array $keys, $data, CacheableDependencyInterface $cacheabili
             // lead to a value being returned.
             if (!array_diff($common_contexts, $previous_step_contexts)) {
               trigger_error(sprintf(
-                'Trying to overwrite a cache redirect with one that has nothing in common, old one at address "%s" was pointing to "%s", new one points to "%s".',
+                'Trying to overwrite a cache redirect for "%s" with one that has nothing in common, old one at address "%s" was pointing to "%s", new one points to "%s".',
+                $chain_cid,
                 implode(', ', $previous_step_contexts),
                 implode(', ', array_diff($result_contexts, $previous_step_contexts)),
                 implode(', ', array_diff($contexts, $previous_step_contexts)),
diff --git a/core/tests/Drupal/Tests/Core/Cache/VariationCacheTest.php b/core/tests/Drupal/Tests/Core/Cache/VariationCacheTest.php
index de218a1a92e1aafa93ec8ed0604e139a2e413d03..f207e34a780765e4fb7bfcaf4774d8902068a736 100644
--- a/core/tests/Drupal/Tests/Core/Cache/VariationCacheTest.php
+++ b/core/tests/Drupal/Tests/Core/Cache/VariationCacheTest.php
@@ -441,7 +441,7 @@ public function testIncompleteRedirectException(): void {
     // a cache redirect should always be present on the redirect itself. In this
     // example, the final cache redirect should be for 'A,B:foo,B'.
     $this->expectException(\LogicException::class);
-    $this->expectExceptionMessage('Trying to overwrite a cache redirect with one that has nothing in common, old one at address "house.type" was pointing to "garden.type:zen", new one points to "garden.type".');
+    $this->expectExceptionMessage('Trying to overwrite a cache redirect for "your:housing:situation:ht.house" with one that has nothing in common, old one at address "house.type" was pointing to "garden.type:zen", new one points to "garden.type".');
 
     $this->housingType = 'house';
     $house_cacheability = (new CacheableMetadata())
@@ -484,7 +484,7 @@ public function testIncompatibleRedirectsException(): void {
     // previous redirects should always be present on the next redirect or item
     // you're trying to store.
     $this->expectException(\LogicException::class);
-    $this->expectExceptionMessage('Trying to overwrite a cache redirect with one that has nothing in common, old one at address "house.type" was pointing to "garden.type", new one points to "house.orientation".');
+    $this->expectExceptionMessage('Trying to overwrite a cache redirect for "your:housing:situation:ht.house" with one that has nothing in common, old one at address "house.type" was pointing to "garden.type", new one points to "house.orientation".');
 
     $this->housingType = 'house';
     $house_cacheability = (new CacheableMetadata())
@@ -523,7 +523,7 @@ public function testIncompatibleChainedRedirectsException(): void {
     }, E_USER_WARNING);
 
     $this->expectException(\LogicException::class);
-    $this->expectExceptionMessage('Trying to overwrite a cache redirect with one that has nothing in common, old one at address "house.type, garden.type" was pointing to "house.orientation", new one points to "solar.type".');
+    $this->expectExceptionMessage('Trying to overwrite a cache redirect for "your:housing:situation:gt.garden:ht.house" with one that has nothing in common, old one at address "house.type, garden.type" was pointing to "house.orientation", new one points to "solar.type".');
 
     $this->housingType = 'house';
     $house_cacheability = (new CacheableMetadata())
@@ -572,7 +572,7 @@ public function testIncompatibleChainedRedirectsComplexException(): void {
     }, E_USER_WARNING);
 
     $this->expectException(\LogicException::class);
-    $this->expectExceptionMessage('Trying to overwrite a cache redirect with one that has nothing in common, old one at address "house.type, garden.type" was pointing to "house.orientation", new one points to "solar.type".');
+    $this->expectExceptionMessage('Trying to overwrite a cache redirect for "your:housing:situation:gt.garden:ht.house" with one that has nothing in common, old one at address "house.type, garden.type" was pointing to "house.orientation", new one points to "solar.type".');
 
     $this->housingType = 'house';
     $house_cacheability = (new CacheableMetadata())