diff options
author | Mark Wells <mark@freeside.biz> | 2015-04-06 17:26:42 -0700 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2015-04-06 17:29:37 -0700 |
commit | fe529fcf74225297231dc3678594166720721205 (patch) | |
tree | d238368a7479d3f290c33af08315eb6f66d40eb1 /FS/FS/Misc/Geo.pm | |
parent | b108f3292bd12e60f086c8f71129e69a0838d816 (diff) |
better error handling on U.S. Census geocoding, #32250
Diffstat (limited to 'FS/FS/Misc/Geo.pm')
-rw-r--r-- | FS/FS/Misc/Geo.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/FS/FS/Misc/Geo.pm b/FS/FS/Misc/Geo.pm index fc80548..1aa5939 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; |