nice ajax error handler; fix model insert