@@ -380,8 +380,8 @@ const CalendarSlice = createSlice({
|
||||
})
|
||||
// Rejected cases
|
||||
.addCase(getCalendarsListAsync.rejected, (state, action) => {
|
||||
state.pending = false;
|
||||
if (action.payload?.status !== 401) {
|
||||
state.pending = false;
|
||||
state.error =
|
||||
action.payload?.message ||
|
||||
action.error.message ||
|
||||
|
||||
@@ -179,8 +179,8 @@ export const userSlice = createSlice({
|
||||
state.loading = true;
|
||||
})
|
||||
.addCase(getOpenPaasUserDataAsync.rejected, (state, action) => {
|
||||
state.loading = false;
|
||||
if (action.payload?.status !== 401) {
|
||||
state.loading = false;
|
||||
state.error =
|
||||
action.payload?.message || "Failed to fetch user information";
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ export const api = ky.extend({
|
||||
if (response.status === 401) {
|
||||
// Check if we're already on login flow to prevent redirect loop
|
||||
const currentPath = window.location.pathname;
|
||||
if (currentPath === "/" || currentPath === "/callback") {
|
||||
if (currentPath === "/callback") {
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user