Skip to content

fix(web): manage plugin connections on mobile#1344

Open
DisturbedCrow wants to merge 3 commits into
supermemoryai:mainfrom
DisturbedCrow:fix/mobile-plugin-management
Open

fix(web): manage plugin connections on mobile#1344
DisturbedCrow wants to merge 3 commits into
supermemoryai:mainfrom
DisturbedCrow:fix/mobile-plugin-management

Conversation

@DisturbedCrow

@DisturbedCrow DisturbedCrow commented Jul 22, 2026

Copy link
Copy Markdown

Restores Manage on active plugin cards on mobile. Disconnect now waits for deletion and refresh before showing success.

Biome and the web build pass.

try {
await authClient.apiKey.delete({ keyId })
const result = await authClient.apiKey.delete({ keyId })
if (result.error) throw new Error(result.error.message)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The exception handling rule requires always using new Error() when throwing errors. On this line, throw new Error(result.error.message) is used correctly in terms of using new Error(), but the supporting data (the original result.error object) should be passed as the cause argument instead of inlining its message into the string. Fix: throw new Error(result.error.message, { cause: result.error }).

Suggested change
if (result.error) throw new Error(result.error.message)
if (result.error) throw new Error(result.error.message, { cause: result.error })

Spotted by Graphite (based on custom rule: TypeScript style guide (Google))

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

if (result.error)
throw new Error(result.error.message, { cause: result.error })
const refreshed = await refetchKeys()
if (refreshed.error) throw refreshed.error

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Exception Handling rule requires always using new Error() when throwing errors. On this line, throw refreshed.error throws a raw error value directly without wrapping it in new Error(). This should be changed to something like throw new Error(refreshed.error.message, { cause: refreshed.error }) to comply with the rule.

Suggested change
if (refreshed.error) throw refreshed.error
if (refreshed.error) throw new Error(refreshed.error.message, { cause: refreshed.error })

Spotted by Graphite (based on custom rule: TypeScript style guide (Google))

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

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