Skip to content

fix: include ImportError details in provider validation#7414

Open
Jah-yee wants to merge 1 commit intomicrosoft:mainfrom
Jah-yee:fix/import-error-details
Open

fix: include ImportError details in provider validation#7414
Jah-yee wants to merge 1 commit intomicrosoft:mainfrom
Jah-yee:fix/import-error-details

Conversation

@Jah-yee
Copy link
Copy Markdown

@Jah-yee Jah-yee commented Mar 17, 2026

When optional dependency imports fail, users currently see only a generic 'Could not import provider X' message without the original exception details (e.g., 'No module named vertexai').

This change:

  • Captures the original ImportError exception
  • Includes it in the error message for better debugging
  • Updates suggestion to mention optional/transitive dependencies

Fixes #7404

When optional dependency imports fail, users currently see only a
generic 'Could not import provider X' message without the original
exception details (e.g., 'No module named vertexai').

This change:
- Captures the original ImportError exception
- Includes it in the error message for better debugging
- Updates suggestion to mention optional/transitive dependencies

Fixes microsoft#7404
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant