fix(web): preserve plugin revoke error cause

This commit is contained in:
DisturbedCrow 2026-07-23 15:18:39 +05:30
parent 8ad25d05a4
commit bad873c566

View file

@ -2836,7 +2836,8 @@ export function IntegrationsView({
const handleRevokePluginKey = async (keyId: string) => {
try {
const result = await authClient.apiKey.delete({ keyId })
if (result.error) throw new Error(result.error.message)
if (result.error)
throw new Error(result.error.message, { cause: result.error })
const refreshed = await refetchKeys()
if (refreshed.error) throw refreshed.error
toast.success("Plugin disconnected")