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 "dataProvider should return a rejected Promise" error in GraphQL providers #5795

Merged
merged 1 commit into from Jan 20, 2021

Conversation

fzaninotto
Copy link
Member

Problem

Providers based on ra-data-graphql can throw sync errors when there is problem. useDataProvider complains about that:

Unhandled Rejection (Error): The dataProvider threw an error. It should return a rejected Promise instead.

Solution

Return a rejected Promise instead.

Closes #5788

@fzaninotto fzaninotto added the RFR Ready For Review label Jan 18, 2021
@fzaninotto fzaninotto added this to the 3.11.4 milestone Jan 18, 2021
@djhi djhi merged commit d94f8c4 into master Jan 20, 2021
@djhi djhi deleted the fix-graphql-buildQuery-error branch January 20, 2021 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFR Ready For Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Not Understanable Error
2 participants