Thanks for this. This didn’t work for me but I ended up finding my answer here: Error Router
I hope it helps someone else.