B1: React Query deeper adoption (P1–P3) #86

Closed
null wants to merge 340 commits from branch/b1-react-query into main
1 changed files with 2 additions and 1 deletions
Showing only changes of commit a66fe13bc6 - Show all commits

View File

@ -64,7 +64,7 @@ async function claimSetupToken(setupToken) {
let accessUrl;
try {
const res = await fetch(claimUrl, { method: 'POST' });
const res = await fetch(claimUrl, { method: 'POST', signal: AbortSignal.timeout(30000) });
if (res.status === 403) {
throw new Error('This setup token has already been claimed or is invalid');
}
@ -99,6 +99,7 @@ async function fetchAccountsAndTransactions(accessUrl, sinceEpoch) {
try {
const res = await fetch(endpoint, {
headers: { 'Authorization': `Basic ${basicAuth}` },
signal: AbortSignal.timeout(30000),
});
if (res.status === 403) {
throw Object.assign(new Error('SimpleFIN access has been revoked — please reconnect'), { code: 'SIMPLEFIN_REVOKED' });