Open zetaraku opened 3 months ago
A confusing error message is shown when running netlify deploy with an invalid NETLIFY_AUTH_TOKEN:
netlify deploy
NETLIFY_AUTH_TOKEN
» Error: Site not found. Please rerun "netlify link"
I did some inspection and found out that a TextHTTPError: Unauthorized error is thrown from line 6 instead of expected line 11 in this file:
TextHTTPError: Unauthorized
https://github.com/netlify/cli/blob/73f4eb59f859adfee142b7213e70168a8cec7681/src/utils/get-site.ts#L4-L18
See also:
NETLIFY_SITE_ID
[build] command = "npm run build" publish = "./dist/"
System: OS: Windows 10 10.0.19045 CPU: (8) x64 Intel(R) Core(TM) i5-10300H CPU @ 2.50GHz Memory: 1.44 GB / 11.84 GB Binaries: Node: 20.12.0 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.19 - ~\.yarn\bin\yarn.CMD npm: 10.8.1 - C:\Program Files\nodejs\npm.CMD pnpm: 8.15.5 - C:\Program Files\nodejs\pnpm.CMD
Describe the bug
A confusing error message is shown when running
netlify deploy
with an invalidNETLIFY_AUTH_TOKEN
:I did some inspection and found out that a
TextHTTPError: Unauthorized
error is thrown from line 6 instead of expected line 11 in this file:https://github.com/netlify/cli/blob/73f4eb59f859adfee142b7213e70168a8cec7681/src/utils/get-site.ts#L4-L18
See also:
Steps to reproduce
netlify deploy
with a validNETLIFY_SITE_ID
and an invalidNETLIFY_AUTH_TOKEN
.Configuration
Environment