mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-01 19:12:42 +00:00
Replacing Exception type from ValueError to ImportError (#9588)
I have restructured the code to ensure uniform handling of ImportError. In place of previously used ValueError, I've adopted the standard practice of raising ImportError with explanatory messages. This modification enhances code readability and clarifies that any problems stem from module importation. @eyurtsev , @baskaryan Thanks
This commit is contained in:
@@ -21,7 +21,7 @@ def _create_client(
|
||||
try:
|
||||
import meilisearch
|
||||
except ImportError:
|
||||
raise ValueError(
|
||||
raise ImportError(
|
||||
"Could not import meilisearch python package. "
|
||||
"Please install it with `pip install meilisearch`."
|
||||
)
|
||||
|
Reference in New Issue
Block a user