on_error and model updates