Handle 404 error in code

Hi,

I’ve recently deployed a Streamlit app to Cloud Run where I’m getting the following 404 error after the Cloud Run timeout is reached:

This specific error is a known issue when deploying Streamlit to Cloud Run (see here) but I wanted to know if it’s possible to handle this 404 error in code and instead show a friendlier message to the user (e.g. “Your connection has timed out, please refresh the page to start again.”)? If not, I think this could be a nice feature to add to Streamlit.

Thanks,
Zoltan

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.