Open sentry-io[bot] opened 1 month ago
need to catch failed fetches and retry before throwing:
export function useText({ file }) {
const [text, setText] = useState(undefined);
const url = useFileURL({ file });
useEffect(() => {
async function loadData() {
const { data } = await axios.get(url); // catch errors
setText(data);
}
if (url) loadData();
}, [url]);
return text;
}
Also catch axios fetch errors in useConnectionInfo
Sentry Issue: DELIBERATION-EMPIRICA-65