Skip to content
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

fix(datastore): use error description to produce clearer error info #3733

Merged
merged 1 commit into from
Jun 3, 2024

Conversation

5d
Copy link
Member

@5d 5d commented May 31, 2024

Issue #

When logging an error with the error itself, the log generates messages like The operation couldn’t be completed, which is no help for developers.

image

Description

Updated to use the error description, to give more error info in error log.

image

General Checklist

  • Added new tests to cover change, if needed
  • Build succeeds with all target using Swift Package Manager
  • All unit tests pass
  • All integration tests pass
  • Security oriented best practices and standards are followed (e.g. using input sanitization, principle of least privilege, etc)
  • Documentation update for the change if required
  • PR title conforms to conventional commit style
  • New or updated tests include Given When Then inline code documentation and are named accordingly testThing_condition_expectation()
  • If breaking change, documentation/changelog update with migration instructions

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@5d 5d requested a review from a team as a code owner May 31, 2024 18:37
Copy link

codecov bot commented May 31, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 68.43%. Comparing base (3ee1924) to head (28223c4).

Files Patch % Lines
...comingAsyncSubscriptionEventToAnyModelMapper.swift 0.00% 1 Missing ⚠️
Additional details and impacted files
@@                  Coverage Diff                  @@
##           flutter-datastore-v2    #3733   +/-   ##
=====================================================
  Coverage                 68.43%   68.43%           
=====================================================
  Files                      1079     1079           
  Lines                     37556    37556           
=====================================================
+ Hits                      25700    25701    +1     
+ Misses                    11856    11855    -1     
Flag Coverage Δ
API_plugin_unit_test 68.76% <ø> (-0.22%) ⬇️
AWSPluginsCore 68.56% <ø> (ø)
Amplify 47.65% <ø> (ø)
Analytics_plugin_unit_test 84.52% <ø> (ø)
Auth_plugin_unit_test 79.42% <ø> (+0.08%) ⬆️
DataStore_plugin_unit_test 81.23% <0.00%> (-0.02%) ⬇️
Geo_plugin_unit_test 72.00% <ø> (ø)
Logging_plugin_unit_test 62.87% <ø> (ø)
Predictions_plugin_unit_test 37.32% <ø> (ø)
PushNotifications_plugin_unit_test 86.21% <ø> (ø)
Storage_plugin_unit_test 76.75% <ø> (ø)
unit_tests 68.43% <0.00%> (+<0.01%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@5d 5d merged commit c0ba0ae into flutter-datastore-v2 Jun 3, 2024
71 checks passed
@5d 5d deleted the 5d/fix-unclear-error-log branch June 3, 2024 18:30
5d added a commit that referenced this pull request Jun 3, 2024
…LBehavior (#3666)

* WIP

* DataStore compiles without SDK dependency

* refactor(datastore-v2): use api plugin with async sequences

* change to use Publisher operators for auth type streams

* add nondeterminsitc operation for better testability

* fix unit test cases

* fix broken unit test cases of AWSAPIPlugin

* fix broken AWSDataStorePlugin unit test cases

* fix OutgoingMutationQueue test case

* remove unused methods

* fix broken test cases of SyncMutationToCloudOperationTests

* fix broken unit test cases of API and DataStore

* resolve plugins build issues (#3654)

* remove lock from SyncMutationToCloudOperation

* remove test case of retryable for signOut error

* resolve comments

* fix(datastore): propagate remote mutationEvents to Hub for sync received (#3697)

* rename the package to InternalAmplifyCredentials

* rewrite NondeterminsticOperation constructor with makeStream

* resolve broken test case after merging latest orgin/main

* feat(amplify): make GraphQLOperationType extends from String (#3719)

* refactor(datastore): new enum to represent inferred and designated authType (#3694)

* refactor(datastore): new enum to represent inferred and designated auth type

* resolve failed multi auth integ tests

* resolve comments

* fix(datastore): use error description to produce clearer error info (#3733)

---------

Co-authored-by: Michael Law <1365977+lawmicha@users.noreply.github.com>
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.

None yet

2 participants