Skip to content

fix: lazy import resend in email_tool#6811

Merged
RichardTang-Aden merged 1 commit into
aden-hive:mainfrom
Hundao:fix/lazy-import-resend
Mar 27, 2026
Merged

fix: lazy import resend in email_tool#6811
RichardTang-Aden merged 1 commit into
aden-hive:mainfrom
Hundao:fix/lazy-import-resend

Conversation

@Hundao

@Hundao Hundao commented Mar 26, 2026

Copy link
Copy Markdown
Collaborator

Description

Move import resend from module level to inside _send_via_resend() with a try/except guard. Without this, missing resend package crashes all tool registration.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)

Related Issues

Fixes #4816

Changes Made

  • Removed bare import resend at module level
  • Added lazy import with try/except inside _send_via_resend(), returns error dict when not installed

Testing

  • Lint passes (cd core && ruff check .)
  • Manual testing performed

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code

@RichardTang-Aden
RichardTang-Aden merged commit c3c3075 into aden-hive:main Mar 27, 2026
8 checks passed
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.

[Bug]: Unguarded 'import resend' in email_tool crashes entire tool registration`

2 participants