benjosaur commited on
Commit
cf4800b
·
1 Parent(s): 3cb2af5

Fix handling of 404 file search

Browse files
Files changed (1) hide show
  1. tools.py +3 -1
tools.py CHANGED
@@ -193,8 +193,10 @@ class APIProcessor:
193
  Returns:
194
  Parsed text output of the attachment
195
  """
 
 
 
196
  response = requests.get(self.file_url, timeout=15)
197
- response.raise_for_status()
198
 
199
  file_extension = self.file_name.split(".")[-1]
200
 
 
193
  Returns:
194
  Parsed text output of the attachment
195
  """
196
+ if not self.file_name:
197
+ return "No attached file for this question"
198
+
199
  response = requests.get(self.file_url, timeout=15)
 
200
 
201
  file_extension = self.file_name.split(".")[-1]
202