From 5c76baba5ec5f2af8a468c8f31921f9227a4f500 Mon Sep 17 00:00:00 2001 From: Dennis Pfisterer Date: Fri, 30 Apr 2021 12:07:49 +0200 Subject: [PATCH] Improved error handling --- app/handler-retry.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/handler-retry.js b/app/handler-retry.js index 1004967..ad972ee 100644 --- a/app/handler-retry.js +++ b/app/handler-retry.js @@ -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` } }