Fix #1077: improved performance and error handling in fetch_attachment

6 jobs for 1077-hanging-podcasts in 4 minutes and 22 seconds (queued for 22 seconds)