From e7f968d37044e073c5ea65a0e1b3559f111c37e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Alby?= Date: Fri, 28 Feb 2020 10:08:32 -0500 Subject: [PATCH] Merge pull request #2637 from overleaf/jpa-hotfix-graceful-session-access [ErrorController] handleError: access session gracefully GitOrigin-RevId: 90c8ce0be80f5f198139a3b079c3a81e200112db --- services/web/app/src/Features/Errors/ErrorController.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/web/app/src/Features/Errors/ErrorController.js b/services/web/app/src/Features/Errors/ErrorController.js index 83bf92d85a..79458f2a34 100644 --- a/services/web/app/src/Features/Errors/ErrorController.js +++ b/services/web/app/src/Features/Errors/ErrorController.js @@ -23,7 +23,7 @@ module.exports = ErrorController = { handleError(error, req, res, next) { const user = AuthenticationController.getSessionUser(req) // log errors related to SAML flow - if (req.session.saml) { + if (req.session && req.session.saml) { SamlLogHandler.log(req.session.saml.universityId, req.sessionID, { error: { message: error && error.message,