I've a situation where I want to route to external site at server-side in my single-page application. I want to redirect at certain condition when my data fetching throws particular status code.
What I've tried -
- I could intercept response in the Express middleware using res.statusCode. This is 500 due to any error in code and I can't distinguish the reason at this time.
- I tried using
<Redirect>
fromreact-dom-router
but this seems like doesn't work for external links.
Can you suggest any way to redirect to external link during server-side rendering?