@overmap-ai/core 1.0.49-fix-error-messaging.2 → 1.0.49-fix-error-messaging.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -4313,10 +4313,20 @@ var __publicField = (obj, key, value) => {
|
|
|
4313
4313
|
innerError: error2
|
|
4314
4314
|
});
|
|
4315
4315
|
}
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
|
|
4316
|
+
if (state.authReducer.isLoggedIn) {
|
|
4317
|
+
console.debug("Forbidden; renewing tokens and retrying.");
|
|
4318
|
+
await client.auth.renewTokens();
|
|
4319
|
+
console.debug("Successfully renewed tokens; retrying request.");
|
|
4320
|
+
return requestToSend.query(queryParams);
|
|
4321
|
+
} else {
|
|
4322
|
+
console.debug("Forbidden; user is not logged in.");
|
|
4323
|
+
throw new APIError({
|
|
4324
|
+
message: "Incorrect username or password.",
|
|
4325
|
+
response: errorResponse,
|
|
4326
|
+
discard: true,
|
|
4327
|
+
innerError: error2
|
|
4328
|
+
});
|
|
4329
|
+
}
|
|
4320
4330
|
}
|
|
4321
4331
|
throw new APIError({ response: errorResponse, innerError: error2, discard: discardStatuses.includes(status) });
|
|
4322
4332
|
}
|
|
@@ -5138,6 +5148,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5138
5148
|
url: "/api/token/",
|
|
5139
5149
|
payload: credentials,
|
|
5140
5150
|
isAuthNeeded: false,
|
|
5151
|
+
checkAuth: false,
|
|
5141
5152
|
blockers: [],
|
|
5142
5153
|
blocks: []
|
|
5143
5154
|
}).then(parseTokens).catch((e) => {
|