From cb98a5117a0315aa385abcec0e07dfeb2487717c Mon Sep 17 00:00:00 2001 From: Mahesh Sanikommu Date: Mon, 12 Oct 2026 22:14:59 -0700 Subject: [PATCH] fix(raycast): skip HTML error bodies and trim comments --- apps/raycast-extension/src/api-error.ts | 3 ++- apps/raycast-extension/src/deferred-prefill.ts | 4 +--- apps/raycast-extension/src/withSupermemory.tsx | 1 - 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/apps/raycast-extension/src/api-error.ts b/apps/raycast-extension/src/api-error.ts index 0f4b7dd1..55aa77f6 100644 --- a/apps/raycast-extension/src/api-error.ts +++ b/apps/raycast-extension/src/api-error.ts @@ -1,3 +1,4 @@ +// Skips HTML error pages (proxy 5xx) so the toast falls back to the status text. export function extractApiErrorMessage(raw: string): string | undefined { const body = raw.trim() if (!body) return undefined @@ -12,7 +13,7 @@ export function extractApiErrorMessage(raw: string): string | undefined { if (typeof message === "string" && message.trim()) return message } } catch { - return body + return body.startsWith("<") ? undefined : body.slice(0, 300) } return undefined diff --git a/apps/raycast-extension/src/deferred-prefill.ts b/apps/raycast-extension/src/deferred-prefill.ts index f430750f..7fa47bfc 100644 --- a/apps/raycast-extension/src/deferred-prefill.ts +++ b/apps/raycast-extension/src/deferred-prefill.ts @@ -16,9 +16,7 @@ export function createDeferredPrefillOwner( if (active && prefillOwnsValue && value) { applyValue(value) } - } catch { - // Selection is unavailable; keep the current value unchanged. - } + } catch {} })() return { diff --git a/apps/raycast-extension/src/withSupermemory.tsx b/apps/raycast-extension/src/withSupermemory.tsx index 01043c3f..30d4f5c9 100644 --- a/apps/raycast-extension/src/withSupermemory.tsx +++ b/apps/raycast-extension/src/withSupermemory.tsx @@ -10,7 +10,6 @@ import type { ComponentType } from "react" export function withSupermemory

(Component: ComponentType

) { return function SupermemoryWrappedComponent(props: P) { - // Let each command enforce its own endpoint-specific permissions and rate limit. const { apiKey } = getPreferenceValues() if (!apiKey.trim()) {