sgbaird commited on
Commit
64f1dbf
·
verified ·
1 Parent(s): de8896f

avoid confusion by removing the default of test image being shown even though it fails

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -262,9 +262,8 @@ def capture_image(url=None, use_test_image=False, test_image_name=None):
262
  logger.error(f"Failed to get image from URL: {response.status_code}")
263
  except Exception as e:
264
  logger.error(f"Error capturing image from URL: {e}")
265
-
266
- logger.info("URL capture failed or not provided, using random test image")
267
- return get_test_image()
268
 
269
 
270
  def health_check():
 
262
  logger.error(f"Failed to get image from URL: {response.status_code}")
263
  except Exception as e:
264
  logger.error(f"Error capturing image from URL: {e}")
265
+ else:
266
+ raise Exception("url is 'N/A'")
 
267
 
268
 
269
  def health_check():