From 5233336ef2c3c470d071b39a5836424e9ef7874f Mon Sep 17 00:00:00 2001 From: bkellam Date: Fri, 5 Dec 2025 11:45:31 -0800 Subject: [PATCH] return generic unexpected service error in sew --- packages/web/src/actions.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/web/src/actions.ts b/packages/web/src/actions.ts index cc239fa9..056a5fd6 100644 --- a/packages/web/src/actions.ts +++ b/packages/web/src/actions.ts @@ -38,8 +38,8 @@ const auditService = getAuditService(); /** * "Service Error Wrapper". * - * Captures any thrown exceptions and converts them to a unexpected - * service error. Also logs them with Sentry. + * Captures any thrown exceptions, logs them to the console and Sentry, + * and returns a generic unexpected service error. */ export const sew = async (fn: () => Promise): Promise => { try { @@ -52,10 +52,6 @@ export const sew = async (fn: () => Promise): Promise => return e.serviceError; } - if (e instanceof Error) { - return unexpectedError(e.message); - } - return unexpectedError(`An unexpected error occurred. Please try again later.`); } }