Skip to content

Commit 452b699

Browse files
committed
let user know about ratelimiting...
1 parent ce2bbfd commit 452b699

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎src/lib/project-fetcher-hoc.jsx‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,11 @@ const fetchProjectToken = async projectId => {
6060
return metadata.project_token;
6161
} catch (e) {
6262
console.error(e); // Use console.error instead of log.error for browser compatibility.
63+
if (e.message && e.message.includes('429')) {
64+
throw new Error('You sent too many requests in a short amount of time. Please wait 1 minute and try again.');
65+
} else{
6366
throw new Error('Cannot access project token. Project is probably unshared. See https://docs.turbowarp.org/unshared-projects');
67+
}
6468
}
6569
};
6670

0 commit comments

Comments
 (0)