Merge pull request #2054 from balena-io/ignore-unauthorized-errors

Treat authorization errors as expected
This commit is contained in:
bulldozer-balena[bot] 2020-10-13 08:56:13 +00:00 committed by GitHub
commit 2cc8d15c05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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) => {