Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


Yup. 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.


You 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: