You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
logger.error("Failed to access collection at %s", project_root)
165
-
raiseMcpError(
166
-
ErrorData(
167
-
code=1,
168
-
message=f"{e.__class__.__name__}: Failed to create the collection at {project_root}.",
169
-
)
170
-
)
165
+
ifisinstance(e, McpError):
166
+
logger.error("Failed to access collection at %s", project_root)
167
+
raise
168
+
else:
169
+
raiseMcpError(
170
+
ErrorData(
171
+
code=1,
172
+
message="\n".join(traceback.format_exception(e)),
173
+
)
174
+
) frome
171
175
172
176
173
177
asyncdefquery_tool(
@@ -222,13 +226,16 @@ async def query_tool(
222
226
returnresults
223
227
224
228
exceptExceptionase:
225
-
logger.error("Failed to access collection at %s", project_root)
226
-
raiseMcpError(
227
-
ErrorData(
228
-
code=1,
229
-
message=f"{e.__class__.__name__}: Failed to access the collection at {project_root}. Use `list_collections` tool to get a list of valid paths for this field.",
230
-
)
231
-
)
229
+
ifisinstance(e, McpError):
230
+
logger.error("Failed to access collection at %s", project_root)
0 commit comments