Summary
When showErrorDetails = false
in the configuration file, the expected behaviour is to hide the tracebacks and show a generic error. This is not what is happening at the moment where only the summary of the error message gets obfuscated.
For example I am trying to access GPT 4 via the API, from an account that does not have access to it. With showErrorDetails = false
I get back:
openai.error.InvalidRequestError: This app has encountered an error. The original error message is redacted to prevent data leaks. Full error details have been recorded in the logs (if you're on Streamlit Cloud, click on 'Manage app' in the lower right of your app).
Traceback:
... Full traceback...
Any idea how I can stop this behaviour and hide all details being shown, including the type of error, eg. the openai.error.InvalidRequestError
? Showing the traceback is very risky in a prod environment, especially for client-facing apps.
Debug info
- Streamlit version: 1.25.0
- Python version: 3.10.4
- PyEnv & Poetry
- OS version: MacOS 13.4.1 (22F82)
- Browser version: Chrome 114.0.5735.198
Requirements file
python = “3.10.4”
streamlit = “^1.25.0”
openai = “^0.27.9”
streamlit-chat = “^0.1.1”
python-dotenv = “^1.0.0”
boto3 = “^1.28.36”
extra-streamlit-components = “^0.1.60”