07-25-2025, 07:02 AM
Hello!
I am using Delphi with IntraWeb.
When a user's session times out (due to timeout), the next request to the application returns HTTP 500 (Internal Server Error).
In my application logic, HTTP 500 is incorrect, since it is not an internal error, but a known session timeout situation.
I would like to return HTTP status code 410 (Deleted) to better reflect the real reason and provide client-side handling.
I could not find a documented way to intercept this situation and change the response code.
Is there a recommended approach to replace the status code with my own?
Thanks!
I am using Delphi with IntraWeb.
When a user's session times out (due to timeout), the next request to the application returns HTTP 500 (Internal Server Error).
In my application logic, HTTP 500 is incorrect, since it is not an internal error, but a known session timeout situation.
I would like to return HTTP status code 410 (Deleted) to better reflect the real reason and provide client-side handling.
I could not find a documented way to intercept this situation and change the response code.
Is there a recommended approach to replace the status code with my own?
Thanks!

