From 7bc7b1d37617b5de113547979c224f27a10f3ad8 Mon Sep 17 00:00:00 2001 From: "Daniele.Mazzotta" Date: Thu, 23 Jun 2022 10:35:50 +0400 Subject: [PATCH] case-insensitive NOT FOUND error catching in getDags Signed-off-by: Daniele.Mazzotta --- plugins/apache-airflow/src/api/ApacheAirflowClient.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/apache-airflow/src/api/ApacheAirflowClient.ts b/plugins/apache-airflow/src/api/ApacheAirflowClient.ts index b6c0a09c3a..c722f5977d 100644 --- a/plugins/apache-airflow/src/api/ApacheAirflowClient.ts +++ b/plugins/apache-airflow/src/api/ApacheAirflowClient.ts @@ -82,7 +82,7 @@ export class ApacheAirflowClient implements ApacheAirflowApi { const response = await Promise.all( dagIds.map(id => { return this.fetch(`/dags/${id}`).catch(e => { - if (e.message === 'Not Found') { + if (e.message.toUpperCase('en-US') === 'NOT FOUND') { dagsNotFound.push(id); } else { throw e;