added catch for http error on downloading attachments