{"record":{"id":"64c9f5111e95cb4c","repo":"diegosouzapw/OmniRoute","slug":"unsupported-search-type-string-input-search-typ","errorCode":null,"errorMessage":"Unsupported search_type: ${String(input.search_type)}","messagePattern":"Unsupported search_type: (.+?)","errorType":"validation","errorClass":"WebSearchExecutionError","httpStatus":400,"severity":"error","filePath":"src/lib/search/executeWebSearch.ts","lineNumber":119,"sourceCode":"      ? fromLimit\n      : providerConfig.defaultMaxResults;\n  return Math.min(Math.max(1, requested), providerConfig.maxMaxResults);\n}\n\nfunction assertValidSearchInput(input: ExecuteWebSearchInput) {\n  if (typeof input.query !== \"string\" || input.query.trim().length === 0) {\n    throw new WebSearchExecutionError(\"Missing required field: query\", 400);\n  }\n  if (input.query.trim().length > 500) {\n    throw new WebSearchExecutionError(\"Query must be 500 characters or fewer\", 400);\n  }\n  if (\n    input.search_type &&\n    input.search_type !== \"web\" &&\n    input.search_type !== \"news\" &&\n    input.search_type !== \"x\"\n  ) {\n    throw new WebSearchExecutionError(`Unsupported search_type: ${String(input.search_type)}`, 400);\n  }\n}\n\nexport async function executeWebSearch(\n  input: ExecuteWebSearchInput\n): Promise<ExecuteWebSearchResult> {\n  assertValidSearchInput(input);\n\n  const log = input.log || defaultLog;\n  if (input.provider === \"x_search\") input.provider = \"x-search\";\n  if (input.provider === \"xquik\" || input.provider === \"xquik_search\") {\n    input.provider = \"xquik-search\";\n  }\n  if (input.provider === \"x-search\" || input.provider === \"xquik-search\") input.search_type = \"x\";\n  const searchType = input.search_type || \"web\";\n\n  if (input.provider) {\n    const explicitProvider = resolveSearchProvider(input.provider);","sourceCodeStart":101,"sourceCodeEnd":137,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/lib/search/executeWebSearch.ts#L101-L137","documentation":"Error \"Unsupported search_type: ${String(input.search_type)}\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at src/lib/search/executeWebSearch.ts:119 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d","analyzedAt":"2026-08-25T18:35:09.898Z","schemaVersion":2},"datasetVersion":"2026-08-25T21:54:21.419Z"}