2019-12-01 22:12:13 +01:00
|
|
|
import { GiteaUnauthorizedError } from "../../util/gitea";
|
|
|
|
import { put } from 'redux-saga/effects';
|
2019-11-28 14:12:48 +01:00
|
|
|
|
2019-12-01 22:12:13 +01:00
|
|
|
export function* failuresSaga(action) {
|
|
|
|
const err = action.error;
|
|
|
|
if (err instanceof GiteaUnauthorizedError) {
|
2019-12-13 14:21:20 +01:00
|
|
|
yield put(logout());
|
2019-12-01 22:12:13 +01:00
|
|
|
}
|
2019-11-28 14:12:48 +01:00
|
|
|
}
|