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

Display API errors properly #1281

Open
srosset81 opened this issue Jun 29, 2024 · 0 comments
Open

Display API errors properly #1281

srosset81 opened this issue Jun 29, 2024 · 0 comments

Comments

@srosset81
Copy link
Contributor

From React-Admin newsletter:

Q: How can I display a custom error message when a user tries to access a resource for which they do not have permission?
A: The dataProvider.checkError() method must return a rejected Promise if the error raised by the API client is an authentication error. This rejected Promise must contain an error object with a message property. This message will be displayed to the user.

unnamed (4)

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

No branches or pull requests

1 participant