added fix

This commit is contained in:
vasilije 2025-09-07 15:21:08 -07:00
parent fc8a6d704e
commit 5486fe7eb4

View file

@ -76,7 +76,7 @@ async def data_item_to_text_file(
raise IngestionError(message="Local files are not accepted.") raise IngestionError(message="Local files are not accepted.")
# data is a relative file path (e.g., "file.json", "data/file.txt") # data is a relative file path (e.g., "file.json", "data/file.txt")
else: elif parsed_url.scheme == "" and not Path(data_item_path).is_absolute():
# This is a relative file path - check if it exists and can be loaded # This is a relative file path - check if it exists and can be loaded
if settings.accept_local_file_path: if settings.accept_local_file_path:
loader = get_loader_engine() loader = get_loader_engine()
@ -86,5 +86,9 @@ async def data_item_to_text_file(
else: else:
raise IngestionError(message="Local files are not accepted.") raise IngestionError(message="Local files are not accepted.")
# data has unsupported URL scheme or format
else:
raise IngestionError(message=f"Unsupported data source format: {data_item_path}")
# data is not a supported type # data is not a supported type
raise IngestionError(message=f"Data type not supported: {type(data_item_path)}") raise IngestionError(message=f"Data type not supported: {type(data_item_path)}")