Skip to content

Docs: Modify email poller check for version 3.1.0#128490

Open
lakshya6378 wants to merge 2 commits into
MicrosoftDocs:mainfrom
lakshya6378:patch-1
Open

Docs: Modify email poller check for version 3.1.0#128490
lakshya6378 wants to merge 2 commits into
MicrosoftDocs:mainfrom
lakshya6378:patch-1

Conversation

@lakshya6378
Copy link
Copy Markdown

Updated the JavaScript SDK email sending sample for @azure/communication-email v3.1.0 compatibility.

The isStarted property has been removed from poller.getOperationState() in newer SDK versions. This change updates the sample to use the new status field ("running") for validating poller initialization.

Updated the poller state check for email sending to reflect changes in @azure/communication-email version 3.1.0.
@learn-build-service-prod
Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 0226b82:

✅ Validation status: passed

File Status Preview URL Details
articles/communication-services/quickstarts/email/includes/send-email-js.md ✅Succeeded

For more details, please refer to the build report.

@lakshya6378
Copy link
Copy Markdown
Author

@lakshya6378 please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@microsoft-github-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@microsoft-github-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@microsoft-github-policy-service agree company="Microsoft"

Contributor License Agreement

@microsoft-github-policy-service agree

@lakshya6378
Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

@prmerger-automator
Copy link
Copy Markdown
Contributor

@lakshya6378 : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change.

@v-regandowner
Copy link
Copy Markdown
Contributor

@natekimball-msft

Can you review the proposed changes?

IMPORTANT: When the changes are ready for publication, adding a #sign-off comment is the best way to signal that the PR is ready for the review team to merge.

#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

@prmerger-automator prmerger-automator Bot added the aq-pr-triaged tracking label for the PR review team label May 13, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates the JavaScript email quickstart sample to be compatible with @azure/communication-email v3.1.0, where poller.getOperationState().isStarted was replaced with a status field.

Changes:

  • Replaces the isStarted check with a status !== "running" check.
  • Adds inline comments explaining the SDK change between v3.0.0 and v3.1.0.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +190 to +204
// NOTE:
// In @azure/communication-email version 3.1.0,
// the `isStarted` flag was removed from `poller.getOperationState()`.
// Instead, the poller state now exposes a `status` field with values
// such as "running", "succeeded", etc.
//
// Previous check: version 3.0.0,
// if (!poller.getOperationState().isStarted) {
// throw "Poller was not started."
// }

// Updated check for v3.1.0+:
if (poller.getOperationState().status !== "running") {
throw "Poller failed to start.";
}
Comment on lines 190 to 206
// NOTE:
// In @azure/communication-email version 3.1.0,
// the `isStarted` flag was removed from `poller.getOperationState()`.
// Instead, the poller state now exposes a `status` field with values
// such as "running", "succeeded", etc.
//
// Previous check: version 3.0.0,
// if (!poller.getOperationState().isStarted) {
// throw "Poller was not started."
// }

// Updated check for v3.1.0+:
if (poller.getOperationState().status !== "running") {
throw "Poller failed to start.";
}


@prmerger-automator
Copy link
Copy Markdown
Contributor

@lakshya6378 : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change.

Updated email sending example to reflect changes in @azure/communication-email v3.1.0.
@learn-build-service-prod
Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 8cb6f40:

✅ Validation status: passed

File Status Preview URL Details
articles/communication-services/quickstarts/email/includes/send-email-js.md ✅Succeeded

For more details, please refer to the build report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants