diff --git a/www/saml2/sp/AssertionConsumerService.php b/www/saml2/sp/AssertionConsumerService.php
index ba3cf812f01c2a1c9f4f27c0467bf288750c0865..9849537194bc4cda88a0bbe4d896e97d7191b07a 100644
--- a/www/saml2/sp/AssertionConsumerService.php
+++ b/www/saml2/sp/AssertionConsumerService.php
@@ -105,7 +105,7 @@ try {
 		} else {
 			/* We don't have an error handler. Show an error page. */
 			SimpleSAML_Utilities::fatalError($session->getTrackID(), 'RESPONSESTATUSNOSUCCESS',
-				new Exception("Status = " . $statusCode));
+				$authnResponse->getStatus());
 		}
 	}