Skip to content

Bug report: Improve formatting of exception messages in CLI terminal output #6789

@martinlingstuyl

Description

@martinlingstuyl

Priority:

Low, something is a little off

Description:

Currently, when an exception occurs in the CLI, the output shown in the terminal contain additional colons: Error: : Specify either id or name. This is due to the ZOD implementation.

Steps to reproduce:

  1. Disable the prompt config key m365 cli config set --key prompt --value false
  2. Trigger a CLI command that validates using zod and cause it to throw an exception. For example, by not providing any input. m365 booking business get
  3. Observe the output in the terminal

Expected results:

  • Error messages are clearly formatted

Actual results:

Additional colons may be inserted into the exception: Error: : Specify either id or name

CLI for Microsoft 365 version:

10.9.0

nodejs version:

22

Operating system (environment):

Windows

Shell:

PowerShell

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions