lib/embulk/input/jira_api/client.rb in embulk-input-jira-0.2.0 vs lib/embulk/input/jira_api/client.rb in embulk-input-jira-0.2.1
- old
+ new
@@ -60,10 +60,16 @@
html = e.message
title = html[%r|<title>(.*?)</title>|, 1] #=> e.g. "Unauthorized (401)"
if title
# (a)
Embulk.logger.warn "JIRA returns HTML: #{html}"
- raise Embulk::ConfigError.new("JIRA returns error: #{title}")
+ case title
+ when "Atlassian Cloud Notifications - Page Unavailable"
+ # a.k.a. HTTP 503
+ raise title
+ when "Unauthorized (401)"
+ raise Embulk::ConfigError.new("JIRA returns error: #{title}")
+ end
else
# (b)
count += 1
retry
end