From fc7d9101e9646b64c67234b0850848ffe6b3f869 Mon Sep 17 00:00:00 2001 From: mitchell Date: Tue, 16 Jun 2026 16:45:17 -0400 Subject: [PATCH] refactor(tts): remove InputError class and use native Error --- tts.ts | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/tts.ts b/tts.ts index 559ecf6..94cce7b 100644 --- a/tts.ts +++ b/tts.ts @@ -12,10 +12,6 @@ import { execa } from "execa"; import { Window } from "happy-dom"; import wrapAnsi from "wrap-ansi"; -class InputError extends Error { - override name = "InputError"; -} - async function main() { const start = Date.now(); @@ -48,9 +44,7 @@ async function main() { } if (!input) { - throw new InputError( - "No input was given. Use positional arguments or stdin.", - ); + throw new Error("No input was given. Use positional arguments or stdin."); } if (url) { @@ -61,7 +55,7 @@ async function main() { await window.happyDOM.waitUntilComplete(); const readable = new Readability(doc).parse(); if (!readable?.textContent) { - throw new InputError( + throw new Error( "Unable to read webpage. This usually means it's blocking scrapers.", ); }