You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When useQuery() throws an error, i'm expecting loaded to be true, according to the docs: error: { error: [error from response], loading: false, loaded: true }
What happened instead:
loaded is false after throwed error.
Steps to reproduce:
In simple demo, call useQuery() hook in a way that it throw an error. It will set loaded to false.
The problem lies in the documentation, not in the code. useQuery (and other query hooks) should return loaded: false in case of error, because the data isn't loaded.
What you were expecting:
When
useQuery()
throws an error, i'm expectingloaded
to be true, according to the docs:error: { error: [error from response], loading: false, loaded: true }
What happened instead:
loaded
is false after throwed error.Steps to reproduce:
In simple demo, call useQuery() hook in a way that it throw an error. It will set
loaded
to false.Related code:
https://github.com/marmelab/react-admin/blob/9a2fc59fb81b3e2e014eeecc194babb340ff833e/packages/ra-core/src/dataProvider/useQuery.ts
The text was updated successfully, but these errors were encountered: