From fe529fcf74225297231dc3678594166720721205 Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Mon, 6 Apr 2015 17:26:42 -0700 Subject: [PATCH] better error handling on U.S. Census geocoding, #32250 --- FS/FS/Misc/Geo.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/FS/FS/Misc/Geo.pm b/FS/FS/Misc/Geo.pm index fc805485d..1aa593974 100644 --- a/FS/FS/Misc/Geo.pm +++ b/FS/FS/Misc/Geo.pm @@ -334,8 +334,12 @@ sub standardize_uscensus { censustract => $result->censustract, }; } else { - die "can't parse address '".$result->address."'"; + die "Geocoding returned '".$result->address."', which does not seem to be a valid address.\n"; } + } elsif ( $result->match_level eq 'Tie' ) { + die "Geocoding was not able to identify a unique matching address.\n"; + } elsif ( $result->match_level ) { + die "Geocoding did not find a matching address.\n"; } else { warn Dumper($result) if $DEBUG; die $result->error_message; -- 2.11.0