Treat authorization errors as expected

Change-type: patch
Resolves: #2035
Signed-off-by: Scott Lowe <scott@balena.io>
This commit is contained in:
Scott Lowe 2020-10-02 16:46:09 +02:00
parent 31123d28f0
commit 592efd0a2e
2 changed files with 2 additions and 0 deletions

View File

@ -148,6 +148,7 @@ const EXPECTED_ERROR_REGEXES = [
/^BalenaDeviceNotFound/, // balena-sdk
/^BalenaExpiredToken/, // balena-sdk
/^BalenaInvalidDeviceType/, // balena-sdk
/Request error: Unauthorized$/, // balena-sdk
/^Missing \d+ required arg/, // oclif parser: RequiredArgsError
/Missing required flag/, // oclif parser: RequiredFlagError
/^Unexpected argument/, // oclif parser: UnexpectedArgsError

View File

@ -126,6 +126,7 @@ describe('handleError() function', () => {
'must also be provided when using', // oclif
'Expected an integer', // oclif
'Flag --foo expects a value', // oclif
'BalenaRequestError: Request error: Unauthorized', // sdk
];
messagesToMatch.forEach((message) => {