@samitouri / QOSami-HFS / commits / 6c41cd49

fix: admin/home: bad visualization of github_quota error for check-updates

Massimo Melina committed Apr 7, 2026 at 23:42 UTC 6c41cd49055432570efbd0a5ac085042c4a1736e
1 file changed +10 -2
src/adminApis.ts
+10 -2
@@ -84,10 +84,18 @@ export const adminApis = {
84 })
85 },
86 async check_update() {
87 - return { options: await getUpdates() }
87 + try {
88 + return { options: await getUpdates() }
89 + } catch (e: any) {
90 + return new ApiError(HTTP_SERVER_ERROR, e?.message)
91 + }
92 },
93 async get_other_versions() {
90 - return { options: await getVersions(r => !r.prerelease) }
94 + try {
95 + return { options: await getVersions(r => !r.prerelease, 20) }
96 + } catch (e: any) {
97 + return new ApiError(HTTP_SERVER_ERROR, e?.message)
98 + }
99 },
100 async wait_project_info() { // used by admin/home/check-for-updates
101 await getProjectInfo()