Skip to content

Bug report: planner task get throws error when executed without --id and --title #3324

@martinlingstuyl

Description

@martinlingstuyl

Description

When executing planner task get an --id or --title option is required. However, it is possible to execute the command without them. This should not be possible, it should throw a validation error. But it doesn't. It throws a (to the user) unintelligible error.

Steps to reproduce

Execute m365 planner task get

or execute m365 planner task get --bucketId 'someid' --ownerGroupName 'Some Group'

Expected results

The command should throw some validation error like:

Error: Specify either id or title, but not both.

Actual results

m365 planner task get throws
Error: The specified ownerGroup undefined does not exist

Or if you execute:
m365 planner task get --bucketId 'someid' --ownerGroupName 'Some Group'
it throws:
Error: Cannot read properties of undefined (reading 'toLocaleLowerCase')

Diagnostics

No response

CLI for Microsoft 365 version

5.3

nodejs version

16.13.1

Operating system (environment)

Linux

Shell

zsh

cli doctor

No response

Additional Info

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions