about summary refs log tree commit diff stats
path: root/ara.pl
diff options
context:
space:
mode:
Diffstat (limited to 'ara.pl')
-rwxr-xr-xara.pl9
1 files changed, 3 insertions, 6 deletions
diff --git a/ara.pl b/ara.pl
index c6c898b..401777b 100755
--- a/ara.pl
+++ b/ara.pl
@@ -146,13 +146,10 @@ if ( not $use_local_file
     # Fetch latest data from api.
     my $url = 'https://api.covid19india.org/data.json';
 
-    my $response = HTTP::Simple::getstore($url, $file);
+    my $status = HTTP::Simple::getstore($url, $file);
 
-    die "Failed to fetch latest data...
-Reason: $response->{reason}\n
-Content: $response->{content}
-Status: $response->{status}\n"
-        unless HTTP::Simple::is_success($response);
+    die "Failed to fetch latest data\n"
+        unless HTTP::Simple::is_success($status);
 }
 
 # Slurp api response to $file_data.