{"record":{"id":"166702b2f4ba8319","repo":"deepseek-ai/deepseek-harness","slug":"queries-must-contain-at-least-one-query","errorCode":null,"errorMessage":"queries must contain at least one query","messagePattern":"queries must contain at least one query","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/web/tool-web/src/search.ts","lineNumber":45,"sourceCode":"  queries: string[]\n}\n\n/**\n * Validate value constraints the schema DSL can't express: `queries` is\n * non-empty, contains only non-blank strings, and fits the deployment's\n * query-count bound. Exact duplicate strings are collapsed after the bound\n * check. Throws a plain `Error` otherwise.\n *\n * @param args - the schema-validated `web_search` arguments.\n * @param maxQueries - the deployment's upper bound on queries in one call.\n * @returns the accepted queries in their first-occurrence order.\n */\nexport function parseSearchArgs(\n  args: WebSearchArgs,\n  maxQueries: number,\n): string[] {\n  const queries = args.queries\n  if (queries.length === 0) throw new Error('queries must contain at least one query')\n  if (queries.length > maxQueries) {\n    const noun = maxQueries === 1 ? 'query' : 'queries'\n    throw new Error(`queries must contain at most ${maxQueries} ${noun}`)\n  }\n  if (queries.some(query => query.trim().length === 0)) throw new Error('each query must be a non-empty string')\n  return [...new Set(queries)]\n}\n\n/** Display label for a source: its title, else its hostname. */\nfunction sourceLabel(url: string, title: string | undefined): string {\n  if (title !== undefined && title.length > 0) return title\n  try {\n    return new URL(url).hostname\n  } catch {\n    // A provider should return a valid URL, but never let a malformed one throw\n    // out of pure formatting — fall back to the raw string.\n    return url\n  }","sourceCodeStart":27,"sourceCodeEnd":63,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/web/tool-web/src/search.ts#L27-L63","documentation":"Error \"queries must contain at least one query\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/web/tool-web/src/search.ts:45 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass at least one query."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}