mirror of
https://github.com/System-End/site.git
synced 2026-04-19 20:55:09 +00:00
emergency patch
This commit is contained in:
parent
d292d9e407
commit
312084e37d
1 changed files with 8 additions and 1 deletions
|
|
@ -10,11 +10,18 @@ export const getAllOnboardProjects = async () => {
|
|||
}
|
||||
}
|
||||
|
||||
const res = await fetch(url, fetchOptions).then(r => r.json())
|
||||
let res;
|
||||
try { res = await fetch(url, fetchOptions).then(r => r.json()) }
|
||||
catch (e) {
|
||||
console.error('Failed to fetch projects from GitHub', e)
|
||||
return []
|
||||
}
|
||||
|
||||
if (res.message && res.message.startsWith('API rate limit exceeded')) {
|
||||
console.error('GitHub API rate limit exceeded')
|
||||
return []
|
||||
}
|
||||
if(!res) return []
|
||||
|
||||
const projects = []
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue