Skip to content

fix(emailsink): add 30s fetch timeout to prevent indefinite hangs (#72)#75

Open
ANSHSINGH050404 wants to merge 1 commit into
bug0inc:mainfrom
ANSHSINGH050404:fix/emailsink-fetch-timeout
Open

fix(emailsink): add 30s fetch timeout to prevent indefinite hangs (#72)#75
ANSHSINGH050404 wants to merge 1 commit into
bug0inc:mainfrom
ANSHSINGH050404:fix/emailsink-fetch-timeout

Conversation

@ANSHSINGH050404

Copy link
Copy Markdown

Adds a 30-second timeout to the emailsink fetch() call to prevent indefinite hangs when the API is slow or unreachable.

Closes #72

Changes

  • src/constants.ts — added EMAIL_FETCH_TIMEOUT = 30000
  • src/providers/emailsink.ts — added signal: AbortSignal.timeout(EMAIL_FETCH_TIMEOUT) to the fetch call

The AbortError propagates into the existing try/catch in extractEmailContent() (src/email.ts:84-90), which logs the warning and retries normally. No new error handling needed.

…g0inc#72)

AbortSignal.timeout(EMAIL_FETCH_TIMEOUT) on the emailsink fetch call. AbortError propagates into the existing retry loop in extractEmailContent.
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.

No fetch timeout in emailsink provider

1 participant