Don't retry Axios if a token decryption failed
If a token decryption failed, it will emit a HTTP 500. We should not retry Axios in this case but rather fail. Note: a token decryption failed should not throw a HTTP 500 but another error code (HTTP 401?) So maybe this fix is plainly wrong.
This commit is contained in:
parent
1e6ce4dec8
commit
ff77a18262
@ -13,6 +13,12 @@ axiosWithRetry.defaults.raxConfig = {
|
||||
|
||||
maxRetryAfter: 60_000,
|
||||
|
||||
statusCodesToRetry: [
|
||||
[100, 199],
|
||||
[429, 429],
|
||||
[501, 599],
|
||||
],
|
||||
|
||||
// You can detect when a retry is happening, and figure out how many
|
||||
// retry attempts have been made
|
||||
onRetryAttempt: (err) => {
|
||||
|
@ -259,6 +259,9 @@ message BanUserMessage{
|
||||
string message = 2;
|
||||
}
|
||||
|
||||
/**
|
||||
* Messages going from back and pusher to the front
|
||||
*/
|
||||
message ServerToClientMessage {
|
||||
oneof message {
|
||||
BatchMessage batchMessage = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user