Skip to content

Commit bd96090

Browse files
committed
adding a version message where the fulltext file doesn't exit
1 parent 546835f commit bd96090

File tree

1 file changed

+3
-3
lines changed
  • src/lambda/chat_with_document_resolver

1 file changed

+3
-3
lines changed

src/lambda/chat_with_document_resolver/index.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,14 +139,14 @@ def handler(event, context):
139139
logger.error(f"S3 ClientError: {error_code} - {error_message}")
140140

141141
if error_code == 'NoSuchKey':
142-
raise Exception(f"File not found: {objectKey}")
142+
raise Exception(f"File not found: {fulltext_key}. The chat feature will not work with files that were processed prior to v0.3.11.")
143143
elif error_code == 'NoSuchBucket':
144144
raise Exception(f"Bucket not found: {output_bucket}")
145145
else:
146146
raise Exception(error_message)
147147

148148
except Exception as e:
149-
logger.error(f"Unexpected error: {str(e)}")
150-
raise Exception(f"Error fetching file: {str(e)}")
149+
logger.error(f"Unexpected Error: {str(e)}")
150+
raise Exception(f"Unexpected Error: {str(e)}")
151151

152152
return response_data

0 commit comments

Comments
 (0)