different-ai/openwork · error

Skill detail response was incomplete.

Error message

Skill detail response was incomplete.

What it means

After the membership check passes, useSkill runs parseSkillResponse(payload) on the skill-detail API response. parseSkillResponse returns null when the payload does not match the expected skill shape, and the hook then throws 'Skill detail response was incomplete.' This guards downstream UI against partially-formed skill objects.

Source

Thrown at ee/apps/den-web/app/(den)/dashboard/_components/skill-data.tsx:107

        requestJson(`/v1/config-objects/${encodedSkillId}/plugins`, { method: "GET" }, 15000),
      ]);
      if (!response.ok) {
        throw new Error(getErrorMessage(payload, `Failed to load skill (${response.status}).`));
      }
      if (!membershipResult.response.ok) {
        throw new Error(getErrorMessage(membershipResult.payload, `Failed to verify skill plugin (${membershipResult.response.status}).`));
      }
      const belongsToPlugin = isRecord(membershipResult.payload)
        && Array.isArray(membershipResult.payload.items)
        && membershipResult.payload.items.some((entry) => (
          isRecord(entry) && entry.pluginId === pluginId && entry.removedAt === null
        ));
      if (!belongsToPlugin) {
        throw new Error("That skill is not part of this plugin.");
      }
      const skill = parseSkillResponse(payload);
      if (!skill) {
        throw new Error("Skill detail response was incomplete.");
      }
      return skill;
    },
  });
}

export function useCreateSkill(pluginId: string) {
  const queryClient = useQueryClient();

  return useMutation({
    mutationFn: async (draft: SkillDraft): Promise<DenSkill> => {
      const { response, payload } = await requestJson(
        "/v1/config-objects",
        {
          method: "POST",
          body: JSON.stringify(createSkillPayload(pluginId, draft)),
        },
        15000,

View on GitHub (pinned to 2b7df46e8a)

Solutions

  1. Log the raw payload at the failing call and compare against parseSkillResponse's required fields to identify the missing property.
  2. Update the client schema/parse function to match the current API version (or pin/upgrade the API deployment so schemas align).
  3. Confirm no proxy/auth redirect is replacing the JSON body (check Content-Type and body via network tab).
  4. Retry after the API fix; if transient, invalidate the react-query cache and refetch.

Example fix

// before
const skill = parseSkillResponse(payload);
if (!skill) throw new Error("Skill detail response was incomplete.");
// after
const skill = parseSkillResponse(payload);
if (!skill) throw new Error(`Skill detail response was incomplete: ${JSON.stringify(payload).slice(0, 200)}`);
Defensive patterns

Strategy: validation

Validate before calling

function looksLikeSkill(v: unknown): boolean {
  return isRecord(v) && typeof v.id === "string" && typeof v.name === "string";
}

Type guard

function isSkill(v: unknown): v is Skill {
  return isRecord(v) && typeof v.id === "string" && typeof v.name === "string" && Array.isArray(v.steps);
}

Try / catch

try {
  const skill = await skillQuery.refetch();
} catch (e) {
  if (e instanceof Error && e.message.includes("Skill detail response was incomplete")) {
    console.error("unexpected payload shape", e);
    // show generic load-error state
  } else throw e;
}

Prevention

When it happens

Trigger: GET skill detail returns 200 but the body is missing required fields (e.g. no id/name/steps) or is not a record, so parseSkillResponse returns null.

Common situations: Server deployed with a newer/older skill schema than the web client expects; an intermediary (proxy/gateway) returns an empty or HTML error body with 200; API regression truncates the detail payload.

Understand the failure class

Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.

Related errors


AI-assisted analysis of different-ai/openwork@2b7df46e8a (2026-09-01). Data as JSON: /api/errors/1bc88b294a4b9a09. Report an issue: GitHub.