stablyai/orca · error · Error

Custom view ID is required

Error message

Custom view ID is required

What it means

Thrown by the linear:getCustomView IPC handler when args.viewId is not a non-empty trimmed string. viewId is required to fetch a single Linear custom view. The handler then calls normalizeCustomViewModel (requiring 'issue' or 'project') and normalizeConcreteWorkspaceId, but the viewId check fails first.

Source

Thrown at src/main/ipc/linear.ts:457

        normalizeWorkspaceSelection(args?.workspaceId),
        args?.force === true
      )
    }
  )

  ipcMain.handle(
    'linear:getCustomView',
    async (
      _event,
      args: {
        viewId: string
        model?: LinearCustomViewModel
        workspaceId?: string
        force?: boolean
      }
    ) => {
      if (typeof args?.viewId !== 'string' || !args.viewId.trim()) {
        throw new Error('Custom view ID is required')
      }
      return getCustomView(
        args.viewId.trim(),
        normalizeCustomViewModel(args.model),
        normalizeConcreteWorkspaceId(args.workspaceId),
        args.force === true
      )
    }
  )

  ipcMain.handle(
    'linear:listCustomViewIssues',
    async (
      _event,
      args: { viewId: string; limit?: number; workspaceId?: string; force?: boolean }
    ) => {
      if (typeof args?.viewId !== 'string' || !args.viewId.trim()) {
        throw new Error('Custom view ID is required')

View on GitHub (pinned to 1136503c6a)

Solutions

  1. Ensure viewId is a non-empty string before calling linear:getCustomView.
  2. Also pass a valid model ('issue'|'project') and concrete workspaceId, or those will throw next.
  3. Clear references to deleted custom views.

Example fix

// before
await ipc.call('linear:getCustomView', { viewId, model, workspaceId })

// after
if (typeof viewId !== 'string' || !viewId.trim()) return
await ipc.call('linear:getCustomView', { viewId: viewId.trim(), model, workspaceId })
Defensive patterns

Strategy: validation

Validate before calling

if (typeof viewId !== 'string' || !viewId.trim()) {
  throw new Error('Linear custom view ID is required')
}

Type guard

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

Prevention

When it happens

Trigger: Invoking linear:getCustomView with viewId undefined, empty, whitespace, or non-string. The renderer tries to load a custom view before its ID is known, or forwards an undefined selection.

Common situations: Opening a custom view detail before the view ID resolves from route/state. A stale/removed custom view reference. Selection state not propagated.

Related errors


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