Skip to content

Update datastore error handling for android + flutter as per #314 #329

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 22 commits into from
Feb 2, 2021

Conversation

Amplifiyer
Copy link
Contributor

Description of changes: Update error handling for android + flutter as per #314

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@Amplifiyer Amplifiyer requested a review from a team as a code owner January 27, 2021 00:49
@Amplifiyer Amplifiyer changed the title Update error handling for android + flutter as per #314 Update datastore error handling for android + flutter as per #314 Jan 27, 2021
@codecov
Copy link

codecov bot commented Jan 27, 2021

Codecov Report

Merging #329 (8913874) into master (1e43208) will increase coverage by 0.10%.
The diff coverage is 61.71%.

@@            Coverage Diff             @@
##           master     #329      +/-   ##
==========================================
+ Coverage   69.75%   69.85%   +0.10%     
==========================================
  Files         232      230       -2     
  Lines        6858     6775      -83     
  Branches      319      315       -4     
==========================================
- Hits         4784     4733      -51     
+ Misses       1953     1924      -29     
+ Partials      121      118       -3     
Flag Coverage Δ
android-unit-tests 63.52% <61.81%> (+0.11%) ⬆️
flutter-unit-tests 57.08% <54.16%> (-0.09%) ⬇️
ios-unit-tests 78.39% <65.30%> (+0.25%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ws/amplify/amplify_core/exception/ExceptionUtil.kt 56.00% <0.00%> (-2.34%) ⬇️
...fy_datastore/DataStoreObserveEventStreamHandler.kt 28.57% <0.00%> (ø)
...kages/amplify_datastore/lib/amplify_datastore.dart 59.25% <0.00%> (ø)
...erface/lib/amplify_datastore_plugin_interface.dart 0.00% <ø> (ø)
...ce/lib/src/types/exception/DataStoreException.dart 0.00% <0.00%> (ø)
...gin_interface/lib/src/types/query/query_field.dart 3.44% <ø> (ø)
...tore/ios/Classes/SwiftAmplifyDataStorePlugin.swift 54.00% <51.42%> (+0.04%) ⬆️
...mplify/amplify_datastore/AmplifyDataStorePlugin.kt 65.19% <64.15%> (+1.17%) ⬆️
...mplify_datastore/lib/method_channel_datastore.dart 89.47% <92.85%> (+0.18%) ⬆️
...ore/ios/Classes/FlutterDataStoreErrorHandler.swift 100.00% <100.00%> (+26.41%) ⬆️
... and 1 more

Copy link
Contributor

@haverchuck haverchuck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made one minor suggestion, but otherwise looks good. It's fine if you disagree with the suggestion.

@@ -94,7 +94,7 @@ public class SwiftAmplifyDataStorePlugin: NSObject, FlutterPlugin {
modelSchemas.forEach { (modelSchema) in
flutterModelRegistration.addModelSchema(modelName: modelSchema.name, modelSchema: modelSchema)
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add an error for lines 83 above. It just says return //TODO

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what should be the right error message be in this case by quickly looking at it. Can you provide one or is this a generic unknown exception?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks to be a generic unknown exception when the map passed from Dart is not correct.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is really minor, so I'll approve now.

@Amplifiyer Amplifiyer changed the base branch from error_handling_refactor to master February 2, 2021 20:10
@fjnoyp fjnoyp self-requested a review February 2, 2021 20:16
@Amplifiyer Amplifiyer merged commit 297a599 into master Feb 2, 2021
@Amplifiyer Amplifiyer deleted the datastore_error_handling branch February 5, 2021 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants