microsoft / microsoft/powerbi-powershell

A Task Was Cancelled Error

Open
#354 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
413
Forks
134
Avg merge
33m
Merged PRs (30d)
1

Description

Using the PowerShell cmdlet, I'm trying to retrieve the workspace list from the tenant but I'm getting below error randomly. I'm trying to find out the exception type so that I can implement the error handling. Please advise the exception type that can be used in the exception handling.

Thanks a lot and looking forward for the response.

Error Message:

GET-POWERBIWORKSPACE : A task was canceled.
At D:\PowerBI\1.ps1:16 char:20

  • ... $WORKSPACEID = GET-POWERBIWORKSPACE -Scope Organization -ALL | WHERE ...
  • CategoryInfo : WriteError: (Microsoft.Power...owerBIWorkspace:GetPowerBIWorkspace) [Get-PowerBIWorkspace], TaskCanceledException
  • FullyQualifiedErrorId : A task was canceled.,Microsoft.PowerBI.Commands.Workspaces.GetPowerBIWorkspace

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the PowerShell command in D:\PowerBI\1.ps1 and trace the Get-PowerBIWorkspace entry point that produces TaskCanceledException. The issue names no repository file or test; done would require identifying the relevant exception behavior and documenting the handling guidance or a reproducible fix.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, powershell
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.