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

DataStore errorHandler cannot capture asynchronous mutation errors #1637

Closed
1 task done
HuiSF opened this issue Jan 25, 2022 · 2 comments · Fixed by #2201
Closed
1 task done

DataStore errorHandler cannot capture asynchronous mutation errors #1637

HuiSF opened this issue Jan 25, 2022 · 2 comments · Fixed by #2201
Assignees
Labels
datastore DataStore category/plugins feature-request Request a new feature

Comments

@HuiSF
Copy link
Member

HuiSF commented Jan 25, 2022

Before opening, please confirm:

Language and Async Model

Java, Kotlin

Amplify Categories

DataStore

Gradle script dependencies

dependencies {
    implementation 'androidx.appcompat:appcompat:1.3.1'
    implementation 'com.google.android.material:material:1.4.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
    implementation 'com.amplifyframework:aws-api:1.31.2'
    implementation 'com.amplifyframework:aws-datastore:1.31.2'
    testImplementation 'junit:junit:4.+'
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}

Environment information

------------------------------------------------------------
Gradle 6.7.1
------------------------------------------------------------

Build time:   2020-11-16 17:09:24 UTC
Revision:     2972ff02f3210d2ceed2f1ea880f026acfbab5c0

Kotlin:       1.3.72
Groovy:       2.5.12
Ant:          Apache Ant(TM) version 1.10.8 compiled on May 10 2020
JVM:          1.8.0_292 (AdoptOpenJDK 25.292-b10)
OS:           Mac OS X 10.16 x86_64

Please include any relevant guides or documentation you're referencing

No response

Describe the bug

DataStore allows developer to provide a custom errorHandler function.
According to the library document, the errorHandler function is invoked for unrecoverable model synchronization errors. However, it never been invoked on any GraphQL error triggered my model mutation, and the library only prints an error log, but not providing an API to allow developers to catch this type off error.

Related amplify-ios issue: aws-amplify/amplify-swift#1555

Reproduction steps (if applicable)

No response

Code Snippet

// Put your code below this line.

Log output

// Put your logs below this line


amplifyconfiguration.json

No response

GraphQL Schema

// Put your schema below this line

Additional information and screenshots

No response

@poojamat poojamat added datastore DataStore category/plugins feature-request Request a new feature labels Jan 27, 2022
@applyinnovations
Copy link

Hey @poojamat I have also logged the same issue on the amplify-js repository which is still open aws-amplify/amplify-js#8891

@github-actions
Copy link
Contributor

github-actions bot commented Feb 1, 2023

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datastore DataStore category/plugins feature-request Request a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants