summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/dbris-m4
1 files changed, 4 insertions, 0 deletions
diff --git a/bin/dbris-m b/bin/dbris-m
index 960927a..9dbaf97 100755
--- a/bin/dbris-m
+++ b/bin/dbris-m
@@ -85,6 +85,10 @@ elsif ( $opt{station} !~ m{ ^ \d+ $ }x ) {
locationSearch => $opt{station},
developer_mode => $developer_mode,
);
+ if ( my $err = $status->errstr ) {
+ say STDERR "Request error while looking up '$opt{station}': ${err}";
+ exit 2;
+ }
my $found;
for my $result ( $status->results ) {
say $result->name;