BowlingX/ra-postgraphile

Intercept the error api response

Closed this issue · 2 comments

I am using ra-postgraphile as dataprovider for react-admin project and i need to intercept the error api response. Is there any error object or function available for that? if yes, Can I get a documentation.

Hi :) This would be the responsibility of the underlying implementation. apollo-graphql is used internally. Depending where you require the error handling, you could do it for example with a custom error link. See here: https://github.com/marmelab/react-admin/tree/master/packages/ra-data-graphql#options how to setup or customize your apollo client.

Thank you for your response,
I have tried apollo-link-error dependency for intercepting error api response and that worked for me.