Skip to content

fix(raycast): surface API error details - #1709

Open
vivekvar-dl wants to merge 1 commit into
supermemoryai:mainfrom
vivekvar-dl:fix/raycast-api-errors
Open

vivekvar-dl wants to merge 1 commit into
supermemoryai:mainfrom
vivekvar-dl:fix/raycast-api-errors

Conversation

@vivekvar-dl

@vivekvar-dl vivekvar-dl commented Sep 28, 2026 •

Copy link
Copy Markdown

Summary

The Raycast client only read message from JSON error responses, while Supermemory APIs commonly return { "error": "..." }. Users therefore saw a generic HTTP status instead of the actionable server response.

This change:

  • reads the standard error field, with message as a fallback
  • preserves useful plain-text error responses
  • keeps the existing status-text fallback for empty or unrecognized bodies
  • adds focused parser coverage

Verification

  • bun test apps/raycast-extension/src/api-error.test.ts (7 passed)
  • npm run build in apps/raycast-extension
  • npx tsc --noEmit -p tsconfig.json after Raycast generated its manifest types
  • git diff --check

npm run lint still reports the repository's existing Prettier mismatch across every Raycast source file; ESLint and manifest validation complete before that pre-existing failure.

Repository-wide checks

  • bun run format-lint — blocked by existing repository diagnostics (3 errors and 104 warnings, including Biome schema-version mismatches); no fixes were applied
  • bun run check-types — blocked in the unchanged packages/ui/components/shadcn-io/dropzone.tsx because react-dropzone is not declared/installed
  • bun run build — all 7 build tasks completed successfully; the root command then failed in postbuild because the Sentry upload requires a maintainer auth token

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant