diff --git a/lib/SimpleSAML/Error/Error.php b/lib/SimpleSAML/Error/Error.php
index bce003aa70e2f1088811f8bbe738759c7f563679..3e0791b28eb4f0de22ac13af8a447cc8cd674651 100644
--- a/lib/SimpleSAML/Error/Error.php
+++ b/lib/SimpleSAML/Error/Error.php
@@ -248,7 +248,7 @@ class Error extends Exception
             // enable error reporting
             $httpUtils = new Utils\HTTP();
             $baseurl = $httpUtils->getBaseURL();
-            $data['errorReportAddress'] = $baseurl . 'errorreport.php';
+            $data['errorReportAddress'] = Module::getModuleURL('core/errorReport');
         }
 
         $data['email'] = '';