3 ms·
Yes, this could generate an awful lot of network traffic in a production system. And since he's using ajax to log errors, and he's hooking into ajaxError, he mi
by philbarr 15y ago
Yes, this could generate an awful lot of network traffic in a production system. And since he's using ajax to log errors, and he's hooking into ajaxError, he might well have a serious problem on his hands if a problem occurs during the attempt to log errors.
I agree with the sentiment though, even if it was a little preachy at the beginning.
- snprbob86 15y agoYup. It's a pretty bad idea to log all errors from ajax calls, since some errors are expected. 403 and 404s, for example, should be handled relatively intelligently. Error-handling is a bitch, but you really need to do it thoughtfully for practically every remote call, similar to robust C code.
- latch 15y agoYou are right about the ajaxError..I'm not sure what I was thinking. I kept it in, but added a note that I was wrong.