I have a register form on every page of my website. During registration some error may occur. After catching the error, I have to return the user to the previous page, sho
If you're using sessions, you can just add that reg_error object to the req.session object before your redirect. Then it will be available on the req.session object when you're loading the previous page.