From f0a14b32932cd2fb56c1a009eabc4b9072d6e591 Mon Sep 17 00:00:00 2001 From: Ian Brechin Date: Thu, 17 Nov 2016 14:27:49 +0000 Subject: [PATCH 1/2] Catch all errors resulting from the attempt to report to GA --- form_error_reporting.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/form_error_reporting.py b/form_error_reporting.py index af64ab0..04a79fd 100644 --- a/form_error_reporting.py +++ b/form_error_reporting.py @@ -41,7 +41,11 @@ def is_valid(self): """ is_valid = super(GAErrorReportingMixin, self).is_valid() if not is_valid: - self.report_errors_to_ga(self.errors) + try: + self.report_errors_to_ga(self.errors) + except: + # no one cares + pass return is_valid def get_ga_single_endpoint(self): From c6341eacf1731b351eb526a598afc04628bc90b4 Mon Sep 17 00:00:00 2001 From: Ian Brechin Date: Thu, 17 Nov 2016 14:28:11 +0000 Subject: [PATCH 2/2] Increase version to 0.4 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 30f95e9..2944b20 100644 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ setup( name='django-form-error-reporting', - version='0.3', + version='0.4', author='Ministry of Justice Digital Services', url='https://github.com/ministryofjustice/django-form-error-reporting', py_modules=['form_error_reporting'],