From a2be1f8981e7cdab08e88d7524436b8310b4cfe0 Mon Sep 17 00:00:00 2001 From: Alf Eaton <75253002+aeaton-overleaf@users.noreply.github.com> Date: Wed, 31 Mar 2021 11:45:01 +0100 Subject: [PATCH] Check that error.info exists (#3865) GitOrigin-RevId: 83c575cc3b94d9d6564d4a2919f81e7b47a116cc --- services/web/app/src/Features/Institutions/InstitutionsAPI.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/web/app/src/Features/Institutions/InstitutionsAPI.js b/services/web/app/src/Features/Institutions/InstitutionsAPI.js index fa2e7547ec..3707d4e2f8 100644 --- a/services/web/app/src/Features/Institutions/InstitutionsAPI.js +++ b/services/web/app/src/Features/Institutions/InstitutionsAPI.js @@ -89,7 +89,7 @@ const InstitutionsAPI = { }, function(error, body) { if (error) { - if (error.info.statusCode === 422) { + if (error.info && error.info.statusCode === 422) { return callback( new InvalidInstitutionalEmailError(error.message).withCause(error) )