MCPcopy Index your code
hub / github.com/codeaashu/claude-code / getPluginNameFromError

Function getPluginNameFromError

src/commands/plugin/PluginSettings.tsx:204–210  ·  view source on GitHub ↗

* Extract the plugin name from a PluginError, checking explicit fields first, * then falling back to the source field (format: "pluginName@marketplace").

(error: PluginError)

Source from the content-addressed store, hash-verified

202 * then falling back to the source field (format: "pluginName@marketplace").
203 */
204function getPluginNameFromError(error: PluginError): string | undefined {
205 if ('pluginId' in error && error.pluginId) return error.pluginId;
206 if ('plugin' in error && error.plugin) return error.plugin;
207 // Fallback: source often contains "pluginName@marketplace"
208 if (error.source.includes('@')) return error.source.split('@')[0];
209 return undefined;
210}
211function buildErrorRows(failedMarketplaces: Array<{
212 name: string;
213 error?: string;

Callers 3

buildErrorRowsFunction · 0.85
_temp7Function · 0.85
_temp6Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected