{"record":{"id":"7935d341a1ae857b","repo":"deepseek-ai/deepseek-harness","slug":"web-provider-error-7935d3","errorCode":"WEB_PROVIDER_ERROR","errorMessage":"Perplexity search request failed: ${String(error)}","messagePattern":"Perplexity search request failed: (.+?)","errorType":"exception","errorClass":"WebError","httpStatus":null,"severity":"error","filePath":"packages/web/web-search-perplexity/src/provider.ts","lineNumber":123,"sourceCode":"        method: 'POST',\n        redirect: 'error',\n        headers: {\n          'authorization': `Bearer ${this.options.apiKey}`,\n          'content-type': 'application/json',\n          'accept': 'application/json',\n          'user-agent': USER_AGENT,\n        },\n        body: JSON.stringify({\n          model: this.options.model,\n          max_tokens: this.options.maxTokens,\n          messages: [{ role: 'user', content: request.query }],\n          ...this.options.searchRecency !== undefined ? { search_recency_filter: this.options.searchRecency } : {},\n        }),\n        ...signal !== undefined ? { signal } : {},\n      })\n    } catch (error: unknown) {\n      if (isAbortError(error)) throw new WebError('Perplexity search aborted', 'WEB_ABORTED', { cause: error })\n      throw new WebError(`Perplexity search request failed: ${String(error)}`, 'WEB_PROVIDER_ERROR', { cause: error })\n    }\n\n    if (!response.ok) {\n      const status = response.status\n      let message = `Perplexity API error (HTTP ${status})`\n      try {\n        const parsed = await response.json() as PerplexityError\n        const detail = typeof parsed.error === 'string' ? parsed.error : parsed.error?.message ?? parsed.message\n        if (detail !== undefined && detail.length > 0) message = detail\n      } catch (error: unknown) {\n        // An abort fired mid-body must surface as WEB_ABORTED, not be swallowed\n        // into a generic HTTP-error message — cancellation is not a provider\n        // error (the seam's cancellation contract).\n        if (isAbortError(error)) throw new WebError('Perplexity search aborted', 'WEB_ABORTED', { cause: error })\n        // Otherwise: the HTTP status is already captured in `message` above; a\n        // malformed/non-JSON error body (normal for gateway 5xx/429s) can only\n        // cost a richer provider message, never the real error.\n      }","sourceCodeStart":105,"sourceCodeEnd":141,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/web/web-search-perplexity/src/provider.ts#L105-L141","documentation":"Error \"Perplexity search request failed: ${String(error)}\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/web/web-search-perplexity/src/provider.ts:123 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the request error in the message; check the Perplexity API key, quota, and network connectivity."],"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"}