Skip to content

Ensure delay doesn't reject with undefined#1152

Open
lukasIO wants to merge 2 commits intomainfrom
lukas/unhandled-rej
Open

Ensure delay doesn't reject with undefined#1152
lukasIO wants to merge 2 commits intomainfrom
lukas/unhandled-rej

Conversation

@lukasIO
Copy link
Contributor

@lukasIO lukasIO commented Mar 19, 2026

Description

Changes Made

Pre-Review Checklist

  • Build passes: All builds (lint, typecheck, tests) pass locally
  • AI-generated code reviewed: Removed unnecessary comments and ensured code quality
  • Changes explained: All changes are properly documented and justified above
  • Scope appropriate: All changes relate to the PR title, or explanations provided for why they're included
  • Video demo: A small video demo showing changes works as expected and did not break any existing functionality using Agent Playground (if applicable)

Testing

  • Automated tests added/updated (if applicable)
  • All tests pass
  • Make sure both restaurant_agent.ts and realtime_agent.ts work properly (for major changes)

Additional Notes


Note to reviewers: Please ensure the pre-review checklist is completed before starting your review.

@changeset-bot
Copy link

changeset-bot bot commented Mar 19, 2026

⚠️ No Changeset found

Latest commit: d3071b0

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

View 1 additional finding in Devin Review.

Open in Devin Review

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Incomplete fix: early-return path at line 792 still rejects with potentially undefined reason

The PR's intent (per the commit message "Ensure delay doesn't reject with undefined") is to prevent the delay promise from rejecting with undefined. The fix at line 796 adds ?? new Error('delay aborted') as a fallback, but the early-return path at line 792 (return Promise.reject(signal.reason)) has the same problem and was not updated. If signal.reason is undefined (e.g., in older runtimes or polyfills where AbortSignal.reason is not supported), this path will still reject with undefined.

(Refers to line 792)

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

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