From 4b7efd3c5c515704d6af4d58b71b14e2b7a2987c Mon Sep 17 00:00:00 2001 From: Adrian Bonpin Date: Sun, 28 Jun 2026 17:36:32 +0800 Subject: [PATCH] fix: accept steamAppId=0 in games lookup, treat 400 as valid key in plugin test --- apps/web/lib/api/games-lookup.ts | 2 +- plugins/decky-vault/main.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/web/lib/api/games-lookup.ts b/apps/web/lib/api/games-lookup.ts index b4225e9..c889715 100644 --- a/apps/web/lib/api/games-lookup.ts +++ b/apps/web/lib/api/games-lookup.ts @@ -11,7 +11,7 @@ export const gamesLookupRoutes = new Elysia({ async ({ query, set }) => { const { steamAppId } = query - if (!steamAppId) { + if (steamAppId === undefined || steamAppId === null) { set.status = 400 return { error: "steamAppId query parameter is required" } } diff --git a/plugins/decky-vault/main.py b/plugins/decky-vault/main.py index 7debaf4..2a2990b 100644 --- a/plugins/decky-vault/main.py +++ b/plugins/decky-vault/main.py @@ -406,8 +406,8 @@ benchmark_percentiles=97,AVG,1,0.1 except urllib.error.HTTPError as e: if e.code == 401: return {"valid": False, "error": "Invalid API key"} - elif e.code == 404: - return {"valid": True} # Key works, just no game with ID 0 + elif e.code in (400, 404): + return {"valid": True} # Key works, just bad request or no game with ID 0 else: return {"valid": False, "error": f"Server returned status {e.code}"} except urllib.error.URLError as e: