ruvnet/ruflo · error

Invalid item ID

Error message

Invalid item ID

What it means

rateItem() ran the item ID through validateItemId and it failed the format check before any network call is made. The itemId supplied for the plugin/model rating is empty or not a valid registry identifier.

Source

Thrown at v3/@claude-flow/cli/src/services/registry-api.ts:61

/**
 * Validate rating value
 */
function validateRating(rating: number): boolean {
  return Number.isInteger(rating) && rating >= 1 && rating <= 5;
}

/**
 * Rate a plugin or model
 */
export async function rateItem(
  itemId: string,
  rating: number,
  itemType: 'plugin' | 'model' = 'plugin',
  userId?: string
): Promise<RatingResponse> {
  if (!validateItemId(itemId)) {
    throw new Error('Invalid item ID');
  }
  if (!validateRating(rating)) {
    throw new Error('Rating must be integer 1-5');
  }

  const response = await fetch(`${REGISTRY_API_URL}?action=rate`, {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({
      itemId,
      rating,
      itemType,
      ...(userId && { userId }),
    }),
    signal: AbortSignal.timeout(10000),
  });

  if (!response.ok) {

View on GitHub (pinned to fa13ee4ad6)

Solutions

  1. Pass a valid registry item ID (non-empty, expected format)

Example fix

Pass a valid registry item ID (existing, correctly formatted identifier) to the rating API.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at v3/@claude-flow/cli/src/services/registry-api.ts:61 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of ruvnet/ruflo@fa13ee4ad6 (2026-08-18). Data as JSON: /api/errors/1610099c0ca7ba87. Report an issue: GitHub.