1

I am new to Relay and am working on a small project using react-relay/classic with react-router-relay. I am trying to decide the best way to implement simple error handling for the case where a query fails.

I am just looking for a "catch all" system which will allow me to tell the user that it looks like they're not online. Nothing more complex is required.

From the Relay documentation, it looks like the regular relay way to do this would be with the renderFailure prop on Relay.RootContainer. However, as I am using react-router-relay I never create a Relay.RootContainer directly - it looks like these are created under-the-hood by react-router-relay.

I haven't been able to find anything in react-router-relay documentation about how to access the underlying Relay.RootContainer props, or on error handling. I have also had a quick look at the source code and nothing obvious jumps out.

So my question is: is there any way I catch query failures when using react-router-relay?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.