clearing cookie redirects to error page on click

clearing cookie redirects to error page on click

  

Hello,

I understand, on page load Outsystems creates OSSESSIONID, osVisit and osVisitor. 

Now when i load my login page, the above mentioned cookies are created. The problem occurs when after page load without logging in to the application, i clear the cookies and try to login, i am redirected to an internalerror page. However, if i dont clear cookies, and try logging in, i see the error message on the same page (which is the expected behaviour). 

I'd like to know if there is a way to catch or remove this error and keep the user in the same page (login page in my case).

PS: This problem comes only after clearing cookies, not cache.


Hi Riddhi,

You can change the destination in case of error in your OnException (if you haven't changed it, it should be in the Common web flow) event handler. By default, two exception handlers are created one for AllExceptions and another for SecurityExceptions. 

As you can see in the image below, if there is an uncaught error that is not Security related, the user is redirected to the InternalError page. You can change this to suit your needs.


Cheers,

João

João Mateus wrote:

Hey João,

The change you mentioned is already in place. As i explained earlier, My problem is - when i clear cookies and click on login page i am redirected to customHandlers/internalerror.jsp.

You can try and reproduce the issue in any of your solutions too, that can tell us if its a platform or code issue. 

Steps to reproduce - 

  1. open a solution in chrome incognito mode, preferably a login page.
  2. open developer tools, go to Application tab. Look for Cookies  on the left menu. Right click and clear all the cookies.
  3. click on LOGIN button. You will be taken to customHandlers/internalerror.jsp.

This issue does not happen on Version 9.1.300.3 though. And can be produced on Versions 9.1.609.0 AND 10.0.604.0 

PS: This is how my exception handler looks - 

Hi Riddhi,

You can change the destination in case of error in your OnException (if you haven't changed it, it should be in the Common web flow) event handler. By default, two exception handlers are created one for AllExceptions and another for SecurityExceptions. 

As you can see in the image below, if there is an uncaught error that is not Security related, the user is redirected to the InternalError page. You can change this to suit your needs.


Cheers,

João