gh-gei icon indicating copy to clipboard operation
gh-gei copied to clipboard

ADO: An invalid PAT should surface a user friendly error

Open begonaguereca opened this issue 1 year ago • 0 comments

Description

If a PAT is not valid, an actionable user friendly error should be surfaced.

Reproduction Steps

export ADO_PAT="1234"
export GH_PAT="VALID_PAT"
gh ado2gh generate-script --ado-org valet-testing --github-org import-testing --output ./tmp

Will create the following output:

-10-12 10:07:59] [INFO] You are running the latest version of the ado2gh CLI [v1.2.0]
[2023-10-12 10:07:59] [INFO] GITHUB ORG: import-testing
[2023-10-12 10:07:59] [INFO] ADO ORG: valet-testing
[2023-10-12 10:07:59] [INFO] OUTPUT: ./tmp
[2023-10-12 10:07:59] [INFO] Generating Script...
[2023-10-12 10:08:01] [ERROR] An unexpected error happened. Please see the logs for details.

I would expect a user friendly error to be surfaced pointing me to an error with a PAT, and also noting the correct perms that are needed.

begonaguereca avatar Oct 12 '23 17:10 begonaguereca