learningequality/ka-lite — pull request #332 by bcipolli (2013-07-31 15:12:25+00:00)
Title: ignore validation errors in UserLog

Issue:
UserLog updates can throw errors--particularly if a user is deleted while logged in.

This code can be made more robust by catching these validation errors. Since nothing can be done, just catching them and logging a console error is best--let the procedure complete (for example, logout) rather than fail due to in-process logging.

Changes:
* Wrap all calls into UserLog with try...catch for Django validation errors. Ignore the errors (logging to console.

Potential Impact:
Extremely low. THis feature is off by default (and so would never throw), and these types of errors are rare anyway.