core/lib/Drupal/Core/EventSubscriber/DefaultExceptionHtmlSubscriber.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/lib/Drupal/Core/EventSubscriber/DefaultExceptionHtmlSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/DefaultExceptionHtmlSubscriber.php index 0ffd5a8..98a46a1 100644 --- a/core/lib/Drupal/Core/EventSubscriber/DefaultExceptionHtmlSubscriber.php +++ b/core/lib/Drupal/Core/EventSubscriber/DefaultExceptionHtmlSubscriber.php @@ -174,7 +174,7 @@ protected function makeSubrequest(GetResponseForExceptionEvent $event, $url, $st // Persist the exception's cacheability metadata, if any. if ($response instanceof CacheableResponseInterface && $exception instanceof CacheableDependencyInterface) { - $response->addCacheableDependency($exception->getCacheableMetadata()); + $response->addCacheableDependency($exception); } // Persist any special HTTP headers that were set on the exception.