percy / percy-script

[Deprecated] PercyScript is the easiest way to get started with visual testing and Percy.
https://percy.io
MIT License
2 stars 2 forks source link

Exit code is zero despite invalid API token #16

Closed grishasergii closed 2 years ago

grishasergii commented 4 years ago

Assume that percy access token is invalid. Then running npx percy exec -- node .\tests\ui\snapshot.js yields something like this:

[percy] StatusCodeError 401 - {"errors":[{"status":"unauthorized","detail":"Invalid API token."}]} | Thu Aug 27 2020 15:46:13 GMT+0200 (GMT+02:00)
[percy] stopping percy...
[percy] waiting for 0 snapshots to complete...
[percy] done.
[percy] percy has started.
[percy] stopping percy...
[percy] waiting for 0 snapshots to complete...
[percy] done.

And the exit code is 0. Why does percy report success and exit with 0 when api token is invalid?