nocobase/nocobase · info

ctx.logger.warn()

Error message

ctx.logger.warn()

What it means

Not a thrown error. This is a completion suggestion entry for `ctx.logger.warn()` in the runjs editor's completions catalog, advertising the Pino-style logger available on the runjs context. It is a static data literal, not a runtime call or failure.

Source

Thrown at packages/core/client-v2/src/flow/components/code-editor/runjsCompletions.ts:348

    insertText: "await ctx.sql.runById('sql-uid', { type: 'selectRows' })",
    boost: 100,
  },
  {
    label: 'ctx.sql.destroy()',
    type: 'function',
    detail: '(uid: string) => Promise<void>',
    insertText: "await ctx.sql.destroy('sql-uid')",
    boost: 95,
  },
  {
    label: 'ctx.logger.info()',
    type: 'function',
    detail: 'Pino logger info',
    insertText: "ctx.logger.info({ foo: 1 }, 'message')",
    boost: 95,
  },
  {
    label: 'ctx.logger.warn()',
    type: 'function',
    detail: 'Pino logger warn',
    insertText: "ctx.logger.warn({ foo: 1 }, 'message')",
    boost: 95,
  },
  {
    label: 'ctx.logger.error()',
    type: 'function',
    detail: 'Pino logger error',
    insertText: "ctx.logger.error({ err }, 'message')",
    boost: 95,
  },
  {
    label: 'ctx.logger.debug()',
    type: 'function',
    detail: 'Pino logger debug',
    insertText: "ctx.logger.debug({ foo: 1 }, 'message')",
    boost: 95,

View on GitHub (pinned to fa42722fef)

Solutions

  1. No action needed — editor suggestion data only.
  2. If searching for real runtime warnings, look at useCodeRunner's logger capture instead of the completions file.
Defensive patterns

Strategy: fallback

Prevention

When it happens

Trigger: Appears when a user types 'ctx.logger' in the runjs editor and the completion engine surfaces the 'warn' entry with insertText "ctx.logger.warn({ foo: 1 }, 'message')".

Common situations: Developers authoring runjs scripts exploring the logger API surface; log-scrapers mistakenly attributing the label string as an emitted warning.

Related errors


AI-assisted analysis of nocobase/nocobase@fa42722fef (2026-09-01). Data as JSON: /api/errors/70d62085d826a8f7. Report an issue: GitHub.