If an error occurs during a chat session for any reason, an error related to the indexing is always returned to the user, along with the exception stack trace. This not useful for the user to identify and correct the problem.
Sorry, something went wrong and I wasn't able to index that path.
Solution
Identify common issues, for example incorrect api key, timeout etc. and return a meaningful error to the user. In case where errors are not known, a generic error should be returned without the full stacktrace.
Summary
If an error occurs during a chat session for any reason, an error related to the indexing is always returned to the user, along with the exception stack trace. This not useful for the user to identify and correct the problem.
Solution
Identify common issues, for example incorrect api key, timeout etc. and return a meaningful error to the user. In case where errors are not known, a generic error should be returned without the full stacktrace.