type: FOLLOWERS_FETCH_FAIL,
id,
error,
+ skipNotFound: true,
};
};
type: FOLLOWING_FETCH_FAIL,
id,
error,
+ skipNotFound: true,
};
};
type: RELATIONSHIPS_FETCH_FAIL,
error,
skipLoading: true,
+ skipNotFound: true,
};
};
};
};
-export function showAlertForError(error) {
+export function showAlertForError(error, skipNotFound = false) {
if (error.response) {
const { data, status, statusText, headers } = error.response;
- if (status === 404 || status === 410) {
+ if (skipNotFound && (status === 404 || status === 410)) {
// Skip these errors as they are reflected in the UI
return { type: ALERT_NOOP };
}
type: IDENTITY_PROOFS_ACCOUNT_FETCH_FAIL,
accountId,
err,
+ skipNotFound: true,
});
timeline,
error,
skipLoading: !isLoadingMore,
+ skipNotFound: timeline.startsWith('account:'),
};
};
const isFail = new RegExp(`${defaultFailSuffix}$`, 'g');
if (action.type.match(isFail)) {
- dispatch(showAlertForError(action.error));
+ dispatch(showAlertForError(action.error, action.skipNotFound));
}
}