sendToGroup/_shouldFailSend: Don't fail send on 401
This commit is contained in:
parent
c08608e5d0
commit
6d535cd026
2 changed files with 2 additions and 7 deletions
|
@ -233,7 +233,7 @@ describe('sendToGroup', () => {
|
||||||
it('returns true for a specified error codes', () => {
|
it('returns true for a specified error codes', () => {
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
const error: any = new Error('generic');
|
const error: any = new Error('generic');
|
||||||
error.code = 401;
|
error.code = 428;
|
||||||
|
|
||||||
assert.isTrue(_shouldFailSend(error, 'testing generic'));
|
assert.isTrue(_shouldFailSend(error, 'testing generic'));
|
||||||
assert.isTrue(
|
assert.isTrue(
|
||||||
|
@ -321,7 +321,7 @@ describe('sendToGroup', () => {
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
const error: any = new Error('generic');
|
const error: any = new Error('generic');
|
||||||
error.code = 401;
|
error.code = 428;
|
||||||
|
|
||||||
assert.isTrue(
|
assert.isTrue(
|
||||||
_shouldFailSend(
|
_shouldFailSend(
|
||||||
|
|
|
@ -787,11 +787,6 @@ export function _shouldFailSend(error: unknown, logId: string): boolean {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (error.code === 401) {
|
|
||||||
logError('Permissions error, failing.');
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (error.code === 404) {
|
if (error.code === 404) {
|
||||||
logError('Missing user or endpoint error, failing.');
|
logError('Missing user or endpoint error, failing.');
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue