Skip to content

Commit

Permalink
Merge pull request #59 from growthbook/add-logger
Browse files Browse the repository at this point in the history
Added log for failed scenario loading feature
  • Loading branch information
vazarkevych authored May 7, 2024
2 parents c31b2cb + 39f9a55 commit 71c66c6
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Sources/CommonMain/Features/FeaturesViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ class FeaturesViewModel {
}
}
}
} else {
delegate?.featuresFetchFailed(error: .failedMissingKey, isRemote: true)
logger.error("Failed get api URL")
}
}

Expand Down Expand Up @@ -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
}
}
}

0 comments on commit 71c66c6

Please sign in to comment.