File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -281,7 +281,7 @@ def index_file(
281281 raise SdkError (f"Error adding nodes to vector db: { e } " )
282282 self .tool .stream_log ("Added nodes to vector db" )
283283
284- self .tool .stream_log ("Done indexing file " )
284+ self .tool .stream_log ("File has been indexed successfully " )
285285 return doc_id
286286
287287 @staticmethod
Original file line number Diff line number Diff line change 11import datetime
22import json
33from abc import ABC , abstractmethod
4- from json import loads
4+ from json import JSONDecodeError , loads
55from pathlib import Path
66from typing import Any , Union
77
@@ -170,6 +170,10 @@ def _get_exec_metadata(self) -> dict[str, Any]:
170170 try :
171171 with open (metadata_path , encoding = "utf-8" ) as f :
172172 metadata_json = loads (f .read ())
173+ except JSONDecodeError as e :
174+ self .stream_error_and_exit (
175+ f"JSON decode error for { metadata_path } : { e } "
176+ )
173177 except FileNotFoundError :
174178 self .stream_error_and_exit (
175179 f"Metadata file not found at { metadata_path } "
You can’t perform that action at this time.
0 commit comments