gchq/CyberChef · warning · OperationError

Length must be less than ${maxLoremCharacters}

Error message

Length must be less than ${maxLoremCharacters}

What it means

Thrown by checkLimits() when lengthType is Bytes and length exceeds maxLoremCharacters. This caps byte-mode generation. The limit is the module-level maxLoremCharacters constant.

Source

Thrown at src/core/operations/GenerateLoremIpsum.mjs:95

 * @param {number} length
 * @throws {OperationError}
 */
function checkLimits(lengthType, length) {
    if (length < 1) {
        throw new OperationError("Length must be greater than 0");
    }

    switch (lengthType) {
        case "Paragraphs":
        case "Sentences":
        case "Words":
            if (length > maxLoremWords) {
                throw new OperationError("Length must be less than " + maxLoremWords);
            }
            break;
        case "Bytes":
            if (length > maxLoremCharacters) {
                throw new OperationError("Length must be less than " + maxLoremCharacters);
            }
            break;
        default:
            throw new OperationError("Invalid length type");
    }
}

View on GitHub (pinned to 4290ea7539)

Solutions

  1. Reduce length to at most maxLoremCharacters (check the module constant for its current value).
  2. Generate in multiple Bytes-mode passes if more output is required.
Defensive patterns

Strategy: validation

Validate before calling

if (lengthType === "Bytes" && length > maxLoremCharacters) {
  // cap length to maxLoremCharacters before invoking
}

Prevention

When it happens

Trigger: Requesting more bytes of lorem ipsum than maxLoremCharacters allows.

Common situations: User selecting Bytes mode and entering a very large length.

Related errors


AI-assisted analysis of gchq/CyberChef@4290ea7539 (2026-08-13). Data as JSON: /api/errors/fc4b5a906496f470. Report an issue: GitHub.