Skip to content

Commit

Permalink
Improved error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
pfisterer committed Apr 30, 2021
1 parent 08f0b02 commit 5c76bab
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/handler-retry.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ module.exports = class RetryHandler {
//Check that the resource still exists if this isn't the first try
if (verifyCrExists && retry > 1) {
try {
await this.operator.crExists(cr.metadata.name)
} catch {
await this.operator.k8sHelper().crExists(cr.metadata.name)
} catch (error) {
this.logger.warn(`Error in retry ${retry}/${this.options.retryCountMax}: CR ${cr.metadata.name} does not exist anymore:`, error)
throw `Error in retry ${retry}/${this.options.retryCountMax}: CR ${cr.metadata.name} does not exist anymore`
}
}
Expand Down

0 comments on commit 5c76bab

Please sign in to comment.