Skip to content

Commit 2ff9374

Browse files
committed
added 429 to detect key exhaustion
1 parent 52151ba commit 2ff9374

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/utils/changelog/detectChangelog.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ function checkLatestGithubRelease(
102102
} satisfies ChangelogMarkdownInfo
103103
})
104104
.catch((e: FetchError) => {
105-
if (e.statusCode == 403) {
106-
// with 403 ungh.cc has exhausted it's api keys, returning 0 to indicate this
105+
if (e.statusCode === 403 || e.statusCode === 429) {
106+
// with 403/429 ungh.cc has exhausted it's api keys, returning error to indicate this
107107
return createError({
108108
statusCode: 502,
109109
statusMessage: ERROR_UNGH_API_KEY_EXHAUSTED,

0 commit comments

Comments
 (0)