stablyai/orca · error · Error
Project name is required
Error message
Project name is required
What it means
Thrown by listProjectsByExactName when the trimmed name is empty. The exact-name lookup needs a non-blank search term; an empty term is rejected before any Linear call. It is a plain Error.
Source
Thrown at src/main/linear/projects.ts:894
>(trimmed ? SEARCH_PROJECTS_QUERY : PROJECTS_QUERY, variables)
const connection = trimmed ? result.data?.searchProjects : result.data?.projects
return {
items: (connection?.nodes ?? []).map((project) => mapProjectForWorkspace(entry, project)),
hasMore: !!connection?.pageInfo?.hasNextPage
}
},
force
)
}
export async function listProjectsByExactName(
name: string,
workspaceId: LinearConcreteWorkspaceId,
force = false
): Promise<LinearProjectSummary[]> {
const projectName = name.trim()
if (!projectName) {
throw new Error('Project name is required')
}
const normalized = projectName.toLowerCase()
const concreteWorkspaceId = normalizeConcreteWorkspaceId(workspaceId)
const key = `listProjectsByExactName:${concreteWorkspaceId}:${normalized}`
return coalesce(
key,
async () => {
const entries = getClients(concreteWorkspaceId)
const entry = entries[0]
if (!entry) {
return []
}
await acquire()
try {
const matches: LinearProjectSummary[] = []
let after: string | undefined
while (true) {
const result = await entry.client.client.rawRequest<View on GitHub (pinned to 1136503c6a)
Solutions
- Trim and validate the name is non-empty at the call site before invoking.
- Return an empty result instead of calling the API when the trimmed name is empty.
- Guard the UI submit handler to disable lookup on blank input.
Example fix
// before const projects = await listProjectsByExactName(rawName, workspaceId) // after const name = rawName.trim() if (!name) return [] const projects = await listProjectsByExactName(name, workspaceId)
Defensive patterns
Strategy: validation
Validate before calling
const name = rawName.trim()
if (!name) return [] // or throw new Error('Project name is required') Type guard
function isNonEmptyName(name: unknown): name is string {
return typeof name === 'string' && name.trim().length > 0
} Try / catch
try { await listProjectsByExactName(name, workspaceId) }
catch (e) { if (e instanceof Error && e.message === 'Project name is required') return [] else throw e } Prevention
- Trim and check the name at the call site before invoking.
- Disable lookup UI actions on blank input.
- Return early for empty names rather than hitting the API.
When it happens
Trigger: Calling listProjectsByExactName('', ws), listProjectsByExactName(' ', ws), or with a name that becomes empty after trim.
Common situations: Caller passed an unvalidated input-field value; whitespace-only name from a form; programmatic lookup with an undefined coerced to string.
Related errors
- Concrete Linear workspace ID is required
- coordinate action requires a visible window and coordinates
- {name} must be a positive integer
- linear_invalid_url
- linear_body_too_large
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/92a6f6ca44c6a6bb.
Report an issue: GitHub.