Stop retrying message send on 400 response
This commit is contained in:
parent
3aa958533b
commit
5c72c785a0
2 changed files with 7 additions and 2 deletions
|
@ -731,6 +731,11 @@ export function _shouldFailSend(error: unknown, logId: string): boolean {
|
|||
// SendMessageChallengeError
|
||||
// MessageError
|
||||
if (isRecord(error) && typeof error.code === 'number') {
|
||||
if (error.code === 400) {
|
||||
logError('Invalid request, failing.');
|
||||
return true;
|
||||
}
|
||||
|
||||
if (error.code === 401) {
|
||||
logError('Permissions error, failing.');
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue