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

useGetManyAggregate throws "filter is not a function" when getting 401 #8130

Closed
matthieuMay opened this issue Sep 1, 2022 · 1 comment · Fixed by #8131
Closed

useGetManyAggregate throws "filter is not a function" when getting 401 #8130

matthieuMay opened this issue Sep 1, 2022 · 1 comment · Fixed by #8131
Labels

Comments

@matthieuMay
Copy link
Contributor

matthieuMay commented Sep 1, 2022

What you were expecting:
When getting a 401, useGetManyAggregate should not throw errors

What happened instead:
useGetManyAggregate throws "filter is not a function" when getting 401

Steps to reproduce:
Log to a react-admin application where you use useGetManyAggregate ; delete your auth cookie manually and see all the errors in the console

Related code:
This is due to useDataProvider that does not return the correct type of data on logout (l.112 of useDataProvider.ts)

Other information:
PR #8131

Environment

  • React-admin version: 4.3.0
@WiXSL
Copy link
Contributor

WiXSL commented Sep 1, 2022

Thanks for reporting this. Please provide a sample application showing the issue by forking the following CodeSandbox (https://codesandbox.io/s/github/marmelab/react-admin/tree/master/examples/simple).

If you are sure this is a bug and you can produce a PR with its corresponding test as you say, that would be great!
Than you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants