fosuserbundle: fixed error handling in template