Translating retry connection error message and fixing E2E tests
This commit is contained in:
parent
51c3f1d972
commit
0be77164ec
7 changed files with 61 additions and 12 deletions
|
@ -1,6 +1,7 @@
|
|||
import axios from "axios";
|
||||
import * as rax from "retry-axios";
|
||||
import { errorStore } from "../Stores/ErrorStore";
|
||||
import { _ } from "../Translator/Translator";
|
||||
|
||||
/**
|
||||
* This instance of Axios will retry in case of an issue and display an error message as a HTML overlay.
|
||||
|
@ -26,10 +27,13 @@ axiosWithRetry.defaults.raxConfig = {
|
|||
console.log(err);
|
||||
console.log(cfg);
|
||||
console.log(`Retry attempt #${cfg?.currentRetryAttempt} on URL '${err.config.url}'`);
|
||||
errorStore.addErrorMessage("Unable to connect to WorkAdventure. Are you connected to internet?", {
|
||||
closable: false,
|
||||
id: "axios_retry",
|
||||
});
|
||||
errorStore.addErrorMessage(
|
||||
_("error.connection-retry.unable-to-connect-to-workAdventure-are-you-connected-to-internet"),
|
||||
{
|
||||
closable: false,
|
||||
id: "axios_retry",
|
||||
}
|
||||
);
|
||||
},
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue