Bugfixes

This should fix the issue in ajax.py that was causing all the TypeError tickets. (Basically, there's a difference between `db.scheduler_task.id` and `db.scheduler_task.task_id` that I by chance never managed to reproduce on my local machine because of the low number of records.)

Also does some better handling of a few common errors that should help reduce the number of error tickets we have to monitor.