From 98220cc1c3660daf402be6a5f70779324652486f Mon Sep 17 00:00:00 2001 From: Dominic Byrd-McDevitt Date: Thu, 7 May 2026 22:11:16 -0400 Subject: [PATCH 1/2] Fix minor code quality issues flagged by GitHub AI findings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix incomplete comment: "for a short amount" → "for a short amount of time" - Fix optional chaining on Promise: cancel()?.catch → cancel().catch (cancel() returns a Promise, not an object; ?.catch would silently drop the handler) Co-Authored-By: Claude Sonnet 4.6 --- src/ThumbnailApi.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ThumbnailApi.ts b/src/ThumbnailApi.ts index 811488e..2f295d4 100644 --- a/src/ThumbnailApi.ts +++ b/src/ThumbnailApi.ts @@ -76,7 +76,7 @@ export class ThumbnailApi { }); // we only want the cache to have the proxied image from the contributor - // for a short amount because it won't have been sized down + // for a short amount of time because it won't have been sized down expressResponse.set(this.responseHelper.getCacheHeaders(SHORT_CACHE_TIME)); let remoteImageResponse: Response | undefined; @@ -192,7 +192,7 @@ export class ThumbnailApi { } private releaseUpstreamBody(response: Response): void { - void response.body?.cancel?.()?.catch(() => {}); + void response.body?.cancel?.().catch(() => {}); } sendError( From 794c27d80b13c521a5b64c68567ed355be3fce66 Mon Sep 17 00:00:00 2001 From: Kevin Payravi Date: Sat, 9 May 2026 20:41:22 +0200 Subject: [PATCH 2/2] Link fix --- src/ThumbnailApi.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ThumbnailApi.ts b/src/ThumbnailApi.ts index 2f295d4..99bf232 100644 --- a/src/ThumbnailApi.ts +++ b/src/ThumbnailApi.ts @@ -192,7 +192,7 @@ export class ThumbnailApi { } private releaseUpstreamBody(response: Response): void { - void response.body?.cancel?.().catch(() => {}); + void response.body?.cancel().catch((_err: unknown) => void _err); } sendError(