From 963e572291c7d183addd9c6cd44eb8b9c3442fee Mon Sep 17 00:00:00 2001 From: Marc Mintel Date: Sat, 28 Feb 2026 23:07:27 +0100 Subject: [PATCH] fix(lint): remove explicit any from check-http error handler --- scripts/check-http.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/scripts/check-http.ts b/scripts/check-http.ts index 474113a..c39945a 100644 --- a/scripts/check-http.ts +++ b/scripts/check-http.ts @@ -75,15 +75,14 @@ async function main() { ); process.exit(0); } - } catch (error: any) { - if (error.response) { + } catch (e: unknown) { + if (axios.isAxiosError(e) && e.response) { console.error( - `\n❌ Critical Error during Sitemap Fetch: HTTP ${error.response.status} ${error.response.statusText}`, + `\n❌ Critical Error during Sitemap Fetch: HTTP ${e.response.status} ${e.response.statusText}`, ); } else { - console.error( - `\n❌ Critical Error during Sitemap Fetch: ${error.message || error}`, - ); + const errorMsg = e instanceof Error ? e.message : String(e); + console.error(`\n❌ Critical Error during Sitemap Fetch: ${errorMsg}`); } process.exit(1); }