diff --git a/lib/Rss2Html/Feed.pm b/lib/Rss2Html/Feed.pm
index b7292a5..2dfee43 100644
--- a/lib/Rss2Html/Feed.pm
+++ b/lib/Rss2Html/Feed.pm
@@ -17,6 +17,7 @@ use strict;
use warnings;
use v5.14;
use Moose;
+use Try::Tiny;
use Cache::Memcached;
use Encode qw(decode_utf8);
@@ -128,7 +129,13 @@ sub update {
}
} elsif ($self->{type} eq 'atom') {
my $api = XML::Atom::Client->new();
- my $atomfeed = $api->getFeed($self->{url});
+ my $atomfeed;
+ try {
+ # This doesn't work. XML::Atom::Client EXITS on error!
+ $atomfeed = $api->getFeed($self->{url});
+ } catch {
+ $self->log->error("error fetching $self->{url}: $@");
+ }
if ($atomfeed) {
my @items = $atomfeed->entries;
for my $item (@items) {