Redux-Saga handles API call failures using try...catch blocks within generator functions. If an API call (using call) fails, the error is caught in the catch block, allowing the saga to dispatch a failure action using put.
Example:
function* fetchDataSaga() {
try {
const response = yield call(api.fetchData);
yield put({ type: 'FETCH_SUCCESS', payload: response });
} catch (error) {
yield put({ type: 'FETCH_FAILURE', error });
}
}