Skip to content

Error: The dataProvider threw an error. It should return a rejected Promise instead. #143

@rachit-malvi

Description

@rachit-malvi

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
Screenshot 2020-03-18 at 5 42 33 PM

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions