ra-data-feathers
ra-data-feathers copied to clipboard
Error: The dataProvider threw an error. It should return a rejected Promise instead.
As per the doc on https://github.com/marmelab/react-admin/blob/master/docs/DataProviders.md "Error Format When the API backend returns an error, the Data Provider should return a rejected Promise containing an Error object. This object should contain a status property with the HTTP response code (404, 500, etc.). React-admin inspects this error code, and uses it for authentication (in case of 401 or 403 errors). Besides, react-admin displays the error message on screen in a temporary notification."
The data provider isn't returning a rejected promise. react-admin version 3.3.1 ra-data-feathers version 2.7.0
Refer the code below
- Does feathers client return rejected promises on error?
- What is returning on error in your example?
- Can you make a test?
- On using getOne instead of getList and passing a non-existing userId, it returns Error.
- When I try to GET the users list on Postman, it gives the correct result.
I cant understand if you call getOne with a non-existing userId, what value are you expecting back?