From 39f9a550485a2853ef71e087eeff8bee7b86ff38 Mon Sep 17 00:00:00 2001 From: Volodymyr Nazarkevych Date: Tue, 7 May 2024 11:04:01 +0300 Subject: [PATCH] added log for failed scenario loading feature --- Sources/CommonMain/Features/FeaturesViewModel.swift | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Sources/CommonMain/Features/FeaturesViewModel.swift b/Sources/CommonMain/Features/FeaturesViewModel.swift index affe9b8..89c585a 100644 --- a/Sources/CommonMain/Features/FeaturesViewModel.swift +++ b/Sources/CommonMain/Features/FeaturesViewModel.swift @@ -76,6 +76,9 @@ class FeaturesViewModel { } } } + } else { + delegate?.featuresFetchFailed(error: .failedMissingKey, isRemote: true) + logger.error("Failed get api URL") } } @@ -108,13 +111,19 @@ class FeaturesViewModel { } } else { delegate?.featuresFetchFailed(error: .failedMissingKey, isRemote: true) + logger.error("Failed get encryption key or it's empty") return } } else { - delegate?.featuresFetchFailed(error: .failedParsedData, isRemote: true) + delegate?.featuresFetchFailed(error: .failedMissingKey, isRemote: true) + logger.error("Failed get encrypted features or it's empty") return } } + } else { + delegate?.featuresFetchFailed(error: .failedParsedData, isRemote: true) + logger.error("Failed get features data model") + return } } }