Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 22, 2026

The fetchLogoAsBase64 function could hang indefinitely on unresponsive servers, blocking email delivery.

Changes

  • Added 10-second timeout using AbortController on fetch operation
  • Timeout cleanup moved to finally block to prevent memory leaks
  • Falls back to original URL on timeout (existing error handling)
const controller = new AbortController();
const timeoutId = setTimeout(() => controller.abort(), 10000);

try {
  const response = await fetch(url, { signal: controller.signal });
  // ... process response
} catch (error) {
  return url; // fallback
} finally {
  clearTimeout(timeoutId);
}

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits January 22, 2026 13:17
Co-authored-by: Anmol1696 <10805402+Anmol1696@users.noreply.github.com>
Co-authored-by: Anmol1696 <10805402+Anmol1696@users.noreply.github.com>
Co-authored-by: Anmol1696 <10805402+Anmol1696@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix base64 logo implementation in email Add fetch timeout to prevent email sending hangs Jan 22, 2026
Copilot AI requested a review from Anmol1696 January 22, 2026 13:22
@Anmol1696
Copy link
Contributor

@copilot can you resolve the conflicts, i changed the base branch though

@Anmol1696 Anmol1696 marked this pull request as ready for review January 22, 2026 13:38
@Anmol1696 Anmol1696 merged commit 8d36ff5 into anmol/inline-logo Jan 22, 2026
@Anmol1696 Anmol1696 deleted the copilot/sub-pr-646-again branch January 22, 2026 13:38
Copilot stopped work on behalf of Anmol1696 due to an error January 22, 2026 13:38
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.

2 participants