Conversation
Contributor
|
are we sure we don't won't to report an error on exception? looks a little suspicious :) |
rlepinski
reviewed
Jul 11, 2025
| @@ -362,7 +362,8 @@ class AirshipPlugin : FlutterPlugin, MethodCallHandler, ActivityAware { | |||
| try { | |||
Contributor
There was a problem hiding this comment.
we should not have a try here, its already handled by the resolve method extension
rlepinski
reviewed
Jul 11, 2025
| } catch (e: Exception) { | ||
| result.error("ERROR", "Failed to get flag", e.localizedMessage) | ||
| if (flagName == null) { | ||
| throw Exception("Missing flagName") |
Contributor
There was a problem hiding this comment.
Nit: requireNotNull instead
rlepinski
approved these changes
Jul 11, 2025
ilitvinenko
approved these changes
Jul 21, 2025
| Log.d("AirshipPlugin", "LiveUpdate update method called successfully") | ||
| null | ||
| } catch (e: Exception) { | ||
| Log.e("AirshipPlugin", "Error processing liveUpdate#update request", e) |
Contributor
There was a problem hiding this comment.
do we log exceptions somewhere else?
Contributor
There was a problem hiding this comment.
It will reject it at the flutter level to let them log it as its a usage error and not a plugin error
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What do these changes do?
Remove the resolve function call in the feature flag part of the plugin.
Why are these changes necessary?
Following an EU escalation, where the customer had crashes if the app was in airplane mode, it couldn't get the feature flags, and also couldn't catch the exception to avoid the crash.

cf logs :
This happened cause we were calling twice result.error (in AirshipPlugin.kt and in Extensions.kt)
How did you verify these changes?
Running in the sample app, with airplane mode and trying to catch the exception of a feature flag, it works properly now we only have logs and the app can still function.