From 8584997f5fd8dbe7f0bd8dc6ed46f049dcdf3acf Mon Sep 17 00:00:00 2001 From: Claus Date: Thu, 6 Aug 2015 16:03:12 +0200 Subject: [PATCH] U4-6808 Bug in umbRequestHelper service causing exceptions to end up in backoffice. --- .../src/common/services/umbrequesthelper.service.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/services/umbrequesthelper.service.js b/src/Umbraco.Web.UI.Client/src/common/services/umbrequesthelper.service.js index 963e2af06e..f0548faac7 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/umbrequesthelper.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/umbrequesthelper.service.js @@ -248,7 +248,7 @@ function umbRequestHelper($http, $q, umbDataFormatter, angularHelper, dialogServ //This is a bit of a hack to check if the error is due to a file being uploaded that is too large, // we have to just check for the existence of a string value but currently that is the best way to // do this since it's very hacky/difficult to catch this on the server - if (data.indexOf("Maximum request length exceeded") >= 0) { + if (typeof data !== "undefined" && typeof data.indexOf === "function" && data.indexOf("Maximum request length exceeded") >= 0) { notificationsService.error("Server error", "The uploaded file was too large, check with your site administrator to adjust the maximum size allowed"); } else if (Umbraco.Sys.ServerVariables["isDebuggingEnabled"] === true) {