-
Notifications
You must be signed in to change notification settings - Fork 257
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
Conversation
…amplify_core_refactor
Codecov Report
@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more.
|
...re/android/src/main/kotlin/com/amazonaws/amplify/amplify_datastore/AmplifyDataStorePlugin.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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.
packages/amplify_datastore_plugin_interface/lib/src/types/exception/DataStoreException.dart
Show resolved
Hide resolved
packages/amplify_datastore/ios/Classes/FlutterDataStoreErrorHandler.swift
Show resolved
Hide resolved
packages/amplify_datastore/ios/Classes/FlutterDataStoreErrorHandler.swift
Show resolved
Hide resolved
@@ -94,7 +94,7 @@ public class SwiftAmplifyDataStorePlugin: NSObject, FlutterPlugin { | |||
modelSchemas.forEach { (modelSchema) in | |||
flutterModelRegistration.addModelSchema(modelName: modelSchema.name, modelSchema: modelSchema) | |||
} | |||
|
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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.