jackwener/OpenCLI · error · CommandExecutionError

${label} did not include a stable text value.

Error message

${label} did not include a stable text value.

What it means

A CommandExecutionError thrown by requireText (clis/dongchedi/utils.js:133), called by parseKoubei and parseModels (name/fields extraction). It fires when a text field that must be non-empty (e.g. a model name or review field) is missing, null, or whitespace-only after cleaning. The library refuses to emit rows with unstable/blank identifying text.

Source

Thrown at clis/dongchedi/utils.js:133

export function requireArray(value, label) {
    if (!Array.isArray(value)) {
        throw new CommandExecutionError(`${label} returned an unexpected payload shape; expected an array.`);
    }
    return value;
}

export function requireStableId(value, label) {
    const id = String(value ?? '').trim();
    if (!/^\d+$/.test(id) || id === '0') {
        throw new CommandExecutionError(`${label} did not include a stable numeric id.`);
    }
    return id;
}

export function requireText(value, label) {
    const text = clean(value);
    if (!text) {
        throw new CommandExecutionError(`${label} did not include a stable text value.`);
    }
    return text;
}

/** Rescale a Dongchedi x100 score int (422) to a /5 float (4.22). */
export function parseScore(raw) {
    const n = Number(raw);
    if (!Number.isFinite(n) || n <= 0) return null;
    return Number((n / 100).toFixed(2));
}

/**
 * Normalize a series id argument: a bare number, or a
 * `https://www.dongchedi.com/auto/series/<id>` URL.
 */
export function normalizeSeriesId(rawInput) {
    const raw = String(rawInput || '').trim();
    if (!raw) throw new ArgumentError('series_id must be a non-empty value');

View on GitHub (pinned to 49907e53dc)

Solutions

  1. Inspect the live pageProps entry to locate the current key holding the display text and update the parser.
  2. Skip entries with genuinely missing names (pre-release/placeholder items) before calling requireText.
  3. Catch CommandExecutionError and drop the row with a log noting which label lacked text.
  4. Update test fixtures so required text fields match the real non-empty SSR values.

Example fix

// before
const name = requireText(model.name, 'model name'); // throws when name is blank
// after
if (!clean(model.name)) continue; // skip unnamed placeholder entries
const name = requireText(model.name, 'model name');
Defensive patterns

Strategy: validation

Validate before calling

function hasText(v) {
  return String(v ?? '').replace(/\s+/g, ' ').trim().length > 0;
}

Try / catch

try {
  const name = requireText(model.name, 'model name');
} catch (err) {
  if (err instanceof CommandExecutionError && /stable text value/.test(err.message)) {
    skipRow(model, 'missing name'); // drop placeholder rows gracefully
  } else throw err;
}

Prevention

When it happens

Trigger: Parsing entries whose `name` or required text field is empty: pre-release cars listed without names, koubei entries with stripped/hidden user or car fields, or a Dongchedi schema change renaming the text key so the parser reads undefined.

Common situations: Freshly published models not yet given display names; reviews where the platform redacted the reviewer or car; a redeploy moving `name` to a localized/nested key.

Understand the failure class

Background: "Missing required field" and "field is required" errors: why libraries reject payloads that omit mandatory fields — this error's family across 20 libraries.

Related errors


AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29). Data as JSON: /api/errors/61f21a0006de06e0. Report an issue: GitHub.