Skip to content

[BUG] API request timeout should always clear its timer #465

@utksh1

Description

@utksh1

Problem

frontend/src/api.ts clears the request timeout after fetch() resolves. If fetch() rejects or is aborted, the timeout cleanup path is skipped.

Expected behavior

The timeout should be cleared in a finally block so every request path cleans up its timer.

Acceptance criteria

  • Move timeout cleanup into finally.
  • Preserve the existing abort behavior.
  • Add a focused unit test for rejected/aborted requests proving the timer is cleared.

Metadata

Metadata

Labels

area:frontendFrontend React/UI workbeginner friendlySmall scoped task suitable for beginner contributorsgood first issueFriendly starter issue for first-time contributorslevel:beginner20 pts difficulty label for small beginner-friendly PRspriority:lowNice-to-have issue with low urgencytype:bugBug fix work category bonus labeltype:testingTesting work category bonus label

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions