From 3fce6cea27d3e6129d6c06e528b62e1b11bf7094 Mon Sep 17 00:00:00 2001 From: Evan Senter Date: Sat, 19 Apr 2025 19:45:42 +0100 Subject: Starting to modularize into separate cli / server packages. (#55) * Starting to move a lot of code into packages/server * More of the massive refactor, builds and runs, some issues though. * Fixing outstanding issue with double messages. * Fixing a minor UI issue. * Fixing the build post-merge. * Running formatting. * Addressing comments. --- packages/cli/src/utils/errors.ts | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 packages/cli/src/utils/errors.ts (limited to 'packages/cli/src/utils/errors.ts') diff --git a/packages/cli/src/utils/errors.ts b/packages/cli/src/utils/errors.ts deleted file mode 100644 index 15417c83..00000000 --- a/packages/cli/src/utils/errors.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * @license - * Copyright 2025 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ - -export function isNodeError(error: unknown): error is NodeJS.ErrnoException { - return error instanceof Error && 'code' in error; -} - -export function getErrorMessage(error: unknown): string { - if (error instanceof Error) { - return error.message; - } else { - // Attempt to convert the non-Error value to a string for logging - try { - const errorMessage = String(error); - return errorMessage; - } catch { - // If String() itself fails (highly unlikely) - return 'Failed to get error details'; - } - } -} -- cgit v1.2.3