Joseph Anderson
Joseph Anderson

Reputation: 4144

Kendo UI Grid - Error Happened

I am using nopCommerce 3.3. The admin uses the Kendo UI grid. On occassion, my pages fail to load. I see a dialog box that says error happened that will not disappear. I have found this code on my page:

function display_kendoui_grid_error(n) {
  if(n.errors)
    if(typeof n.errors=="string")
      alert(n.errors);
    else {
      var t="The following errors have occurred:";
      $.each(n.errors, function(n,i) {
        i.errors && (t+="\n", t+=i.errors.join("\n"))
      });
      alert(t)
    }
  else 
    alert("Error happened")
}

I have noticed that CSS fails to load sometimes and possibly, some JS files fail to load. I am running IIS 8 using .NET 4.51. How do I found out the exact error message?

I ran a breakpoint on the code. n.errors is undefined. Is there another place to look for an error?

Upvotes: 0

Views: 698

Answers (2)

Joseph Anderson
Joseph Anderson

Reputation: 4144

I upgraded my hosting plan to a dedicated server and it works. nopCommerce needs a lot of MB in the app pool to operate properly.

Upvotes: 1

CodingWithSpike
CodingWithSpike

Reputation: 43698

Set a breakpoint and see what n is, or print out the entire object by changing alert("Error happened") to something like:

alert("Error happened: " + JSON.stringify(n));

If these are errors that the user shouldn't see, then you should use console.error("the message"); instead. of an alert. Then you can see the messages as errors in the devtools console. You can also then just write whole objects to the console: console.error(n);

Upvotes: 0

Related Questions