stablyai/orca · error · Error

Commit message is required

Error message

Commit message is required

What it means

Thrown by the 'git:commit' handler (src/main/ipc/filesystem.ts:1419) when args.message is not a string or is empty/whitespace-only. The check runs at the IPC boundary so the renderer gets a clear error instead of an opaque execFile/git failure downstream, and it applies to both the remote (SSH provider) and local commit paths.

Source

Thrown at src/main/ipc/filesystem.ts:1419

      const filePath = validateGitRelativeFilePath(worktreePath, args.filePath)
      const gitOptions = getLocalGitOptionsForRegisteredWorktree(
        store,
        args.worktreePath,
        worktreePath
      )
      return getDiff(worktreePath, filePath, args.staged, args.compareAgainstHead, gitOptions)
    }
  )

  ipcMain.handle(
    'git:commit',
    async (
      _event,
      args: { worktreePath: string; message: string; connectionId?: string }
    ): Promise<{ success: boolean; error?: string }> => {
      // Why: validate at the IPC boundary so the renderer gets a clear error instead of an opaque execFile failure.
      if (typeof args.message !== 'string' || args.message.trim().length === 0) {
        throw new Error('Commit message is required')
      }
      if (args.connectionId) {
        const provider = getSshGitProvider(args.connectionId)
        if (!provider) {
          throw new Error(SSH_GIT_PROVIDER_UNAVAILABLE_MESSAGE)
        }
        return provider.commit(args.worktreePath, args.message)
      }
      const worktreePath = await resolveRegisteredWorktreePath(args.worktreePath, store)
      const gitOptions = getLocalGitOptionsForRegisteredWorktree(
        store,
        args.worktreePath,
        worktreePath
      )
      return commitChanges(worktreePath, args.message, gitOptions)
    }
  )

View on GitHub (pinned to 1136503c6a)

Solutions

  1. Pass a non-empty, trimmed commit message.
  2. Disable the commit action in the UI until message.trim().length > 0.
  3. If the message comes from an AI generator, validate its output and re-prompt on empty.

Example fix

// before: empty message allowed through
await invoke('git:commit', { worktreePath, message: '' })

// after: guard before invoking
const msg = message.trim()
if (!msg) throw new UserError('Commit message is required')
await invoke('git:commit', { worktreePath, message: msg })
Defensive patterns

Strategy: validation

Validate before calling

function isValidCommitMessage(m: unknown): m is string {
  return typeof m === 'string' && m.trim().length > 0
}

Type guard

const hasCommitMessage = (a: unknown): a is { message: string } =>
  typeof (a as { message?: unknown })?.message === 'string' &&
  ((a as { message: string }).message.trim().length > 0)

Prevention

When it happens

Trigger: Invoking ipcRenderer.invoke('git:commit', { worktreePath, message }) where message is undefined, null, '', or a string of only whitespace. The guard fires before any SSH provider lookup or local commit attempt.

Common situations: Commit dialog allowing submit with an empty textarea; an AI commit-message generator returning an empty string; a trim/normalization step that reduced the message to whitespace; message field dropped during IPC serialization.

Related errors


AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12). Data as JSON: /api/errors/5f59508f7a24f4ce. Report an issue: GitHub.