From 1934dc8e9d2fb9657e054d074e9e739ec00cf63e Mon Sep 17 00:00:00 2001 From: phantomptr Date: Mon, 28 Sep 2026 22:13:06 -0700 Subject: [PATCH] fix(api): appInfoDetails checks ok through assertOk The require-assert-ok lint rule failed CI on main: the function tested res.ok by hand. A refusal now throws inside the existing try and still yields null (no details), so behaviour is unchanged. Co-Authored-By: Claude Opus 5.5 --- client/src/api/ps5.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/src/api/ps5.ts b/client/src/api/ps5.ts index c95471a5..652abadc 100644 --- a/client/src/api/ps5.ts +++ b/client/src/api/ps5.ts @@ -4939,8 +4939,9 @@ export async function appInfoDetails( titleId: string, ): Promise { try { - const res = await invoke<{ + const resp = await invoke<{ ok?: boolean; + error?: string | null; rows?: Array<{ key?: string; val?: string }>; }>("ps5_appinfo_query", { addr: toMgmtAddr(transferAddr), @@ -4948,7 +4949,8 @@ export async function appInfoDetails( titleId, keys: "CONTENT_VERSION,APP_VER,#_size,#_install_time,#_last_access_time,CONTENT_ID", }); - if (!res?.ok) return null; + // A refusal throws here and lands in the catch below: no details. + const res = assertOk(resp, "Read game details"); const v = new Map((res.rows ?? []).map((r) => [r.key ?? "", (r.val ?? "").trim()])); const get = (k: string) => v.get(k) || null; const size = Number(get("#_size"));