Skip to content

Commit

Permalink
Merge pull request #330 from mansam/catch-bad-requests-during-refresh
Browse files Browse the repository at this point in the history
Catch Bad Request responses in safe_call
(cherry picked from commit 9bc4293ee16e8977450b3002f5fd383129e3f1cc)

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1613758
  • Loading branch information
aufi authored and simaishi committed Aug 14, 2018
1 parent a027ed5 commit 73ec980
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ def safe_call
_log.warn "Not Found response code returned in provider: #{@os_handle.address}. Message=#{err.message}"
_log.warn err.backtrace.join("\n")
nil
rescue Excon::Errors::BadRequest => err
# This can happen if stack resources are missing, among other reasons. In such a case log a warning but continue the refresh.
_log.warn "Bad Request response code returned in provider: #{@os_handle.address}. Message=#{err.message}"
_log.warn err.backtrace.join("\n")
nil
end

alias safe_get safe_call
Expand Down

0 comments on commit 73ec980

Please sign in to comment.