Error Handling service timeouts

01-06-2015 08:37 AM
Frequent Contributor

Am I seeing this correctly?

I've begun using the onError event with my services to indicate to the user that there's an issue when my application loads. This works great when it throws something like a 500 error, etc. Recently, we had a situation where the services were just reaching the 60 second timeout limit. When I was trying to debug this, I noticed that the onError event was called at the conclusion of the 60 second timeout but that the error variable (i.e. layer.on("error", function(error){...})  ) is undefined when the "error" is a service timeout.

Is this as designed? Should I or should I not assume that an undefined error variable within that function is a service timeout?? In other words, is it likely that other "errors" may trigger the onError event but leave the error variable as undefined?



0 Kudos
0 Replies