koala73/worldmonitor · warning · Error

Webhook URL DNS resolution failed

Error message

Webhook URL DNS resolution failed: ${message}

What it means

saveImportedFramework() rejects frameworks whose systemPromptAppend exceeds MAX_INSTRUCTIONS_LEN = 2000 characters. The check uses .length on the raw string, and the thrown message reports both the limit and the actual length so the offender can be trimmed precisely. It fires after the library-cap check but before the duplicate-name check.

Solutions

  1. Trim the instructions to 2000 characters or fewer; the error message states the exact overflow
  2. Compress the wording or split the framework into two focused frameworks
  3. Strip redundant whitespace/indentation before importing
  4. Validate the length in the import UI before calling saveImportedFramework()

Example fix

// before
saveImportedFramework({ id, name, description, systemPromptAppend }); // throws at >2000 chars

// after
const MAX = 2000;
if (systemPromptAppend.length > MAX) {
  showWarning(`Instructions are ${systemPromptAppend.length} chars; limit is ${MAX}.`);
  return;
}
saveImportedFramework({ id, name, description, systemPromptAppend });
Defensive patterns

Strategy: validation

Validate before calling

const MAX = 2000;
if (fw.systemPromptAppend.length > MAX) {
  showWarning(`Instructions are ${fw.systemPromptAppend.length} chars; limit is ${MAX}.`);
  return;
}
saveImportedFramework(fw);

Try / catch

try {
  saveImportedFramework(fw);
} catch (e) {
  if (e instanceof Error && e.message.startsWith('Instructions exceed')) highlightInstructionsEditor();
  else throw e;
}

Prevention

When it happens

Trigger: Importing or pasting an analysis framework with fw.systemPromptAppend.length greater than 2000, e.g., a prompt template copied from an LLM tool with no length limit.

Common situations: Large prompt templates authored elsewhere with different limits; instructions inflated by indentation/whitespace or invisible characters; iterating on a framework that grows over edits.

Understand the failure class

Related errors


AI-assisted analysis of koala73/worldmonitor@7d06c8633d (2026-08-21). Data as JSON: /api/errors/64f43cb107210a1b. Report an issue: GitHub.

Appendix: source

Thrown at api/_notification-webhook-ssrf.ts:248

 * Fail fast at registration when the webhook hostname currently resolves to a
 * private or reserved address. Delivery repeats this check (and pins its
 * connection) because DNS can change after registration.
 */
export async function assertNotificationWebhookRegistrationUrlSafe(
  rawUrl: string,
  resolveHostname: ResolveHostname = defaultResolveHostname,
): Promise<void> {
  const staticError = blockedNotificationWebhookUrlReason(rawUrl);
  if (staticError) throw new Error(staticError);

  const hostname = new URL(rawUrl).hostname.toLowerCase();
  if (isIpLiteral(hostname)) return;
  let resolvedAddresses: string[];
  try {
    resolvedAddresses = await resolveHostname(hostname);
  } catch (error) {
    const message = error instanceof Error ? error.message : String(error);
    throw new Error(`Webhook URL DNS resolution failed: ${message}`);
  }
  if (!resolvedAddresses.length) throw new Error('Webhook URL DNS resolution returned no addresses');
  if (resolvedAddresses.some(isBlockedNotificationResolvedAddress)) {
    throw new Error('Webhook URL must not point to a private/local address');
  }
}

View on GitHub (pinned to 7d06c8633d)