stablyai/orca · error · Error
Custom view model is required
Error message
Custom view model is required
What it means
Thrown by normalizeCustomViewModel when the model argument for a Linear custom view request is neither 'issue' nor 'project'. Linear custom views can be scoped to either issues or projects, and the API needs to know which entity type to fetch. Any other value (including undefined, a typo, or a future model name) is rejected.
Source
Thrown at src/main/ipc/linear.ts:56
return typeof value === 'string' && value.trim() ? value.trim() : undefined
}
function normalizeWorkspaceSelection(value: unknown): LinearWorkspaceSelection | undefined {
const workspaceId = normalizeWorkspaceId(value)
return workspaceId as LinearWorkspaceSelection | undefined
}
function normalizeConcreteWorkspaceId(value: unknown): string {
const workspaceId = normalizeWorkspaceId(value)
if (!workspaceId || workspaceId === 'all') {
throw new Error('Concrete Linear workspace ID is required')
}
return workspaceId
}
function normalizeCustomViewModel(value: unknown): LinearCustomViewModel {
if (value !== 'issue' && value !== 'project') {
throw new Error('Custom view model is required')
}
return value
}
function normalizeIdList(value: unknown, fieldName: string): string[] | undefined {
if (value === undefined) {
return undefined
}
if (
!Array.isArray(value) ||
!value.every((id): id is string => typeof id === 'string' && Boolean(id.trim()))
) {
throw new Error(`Invalid ${fieldName}`)
}
return value.map((id) => id.trim())
}
function normalizeOptionalDate(value: unknown, fieldName: string): string | undefined {View on GitHub (pinned to 1136503c6a)
Solutions
- Always pass model as either 'issue' or 'project' when calling linear:getCustomView.
- Constrain the UI control to a two-option selector and disallow a blank submission.
- Validate the model against the union type before invoking the IPC call.
Example fix
// before
await ipc.call('linear:getCustomView', { viewId, workspaceId })
// after
const model: LinearCustomViewModel = view.target === 'issues' ? 'issue' : 'project'
await ipc.call('linear:getCustomView', { viewId, model, workspaceId }) Defensive patterns
Strategy: type-guard
Validate before calling
const model = args.model
if (model !== 'issue' && model !== 'project') {
throw new Error("Custom view model must be 'issue' or 'project'")
} Type guard
function isCustomViewModel(value: unknown): value is 'issue' | 'project' {
return value === 'issue' || value === 'project'
} Prevention
- Constrain the model UI control to exactly 'issue' and 'project'.
- Always pass model explicitly; never let it default to undefined.
- Use the LinearCustomViewModel union type at the call site.
When it happens
Trigger: Calling linear:getCustomView with args.model set to a value other than 'issue' or 'project'. Commonly model is undefined when the caller forgets to specify it, or a number/typo is passed.
Common situations: A new caller omits the model field. A UI dropdown defaults to an empty/placeholder value that is forwarded to the IPC call. The model string is sourced from user input without restricting to the allowed set.
Related errors
- Custom view ID is required
- Concrete Linear workspace ID is required
- Invalid ${fieldName}
- Project ID is required
- linear_invalid_url
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/feffb56822144345.
Report an issue: GitHub.