{"record":{"id":"f2a37ac5c7a70795","repo":"vxcontrol/pentagi","slug":"there-are-temporarily-offline-for-maintenance-ple","errorCode":null,"errorMessage":"there are temporarily offline for maintenance. please try again later","messagePattern":"there are temporarily offline for maintenance\\. please try again later","errorType":"http","errorClass":null,"httpStatus":503,"severity":"warning","filePath":"backend/pkg/tools/searchers/perplexity.go","lineNumber":237,"sourceCode":"\t\treturn errors.New(\"request is invalid\")\n\tcase http.StatusUnauthorized:\n\t\treturn errors.New(\"API key is wrong\")\n\tcase http.StatusForbidden:\n\t\treturn errors.New(\"the endpoint requested is hidden for administrators only\")\n\tcase http.StatusNotFound:\n\t\treturn errors.New(\"the specified endpoint could not be found\")\n\tcase http.StatusMethodNotAllowed:\n\t\treturn errors.New(\"there need to try to access an endpoint with an invalid method\")\n\tcase http.StatusTooManyRequests:\n\t\treturn errors.New(\"there are requesting too many results\")\n\tcase http.StatusInternalServerError:\n\t\treturn errors.New(\"there had a problem with our server. try again later\")\n\tcase http.StatusBadGateway:\n\t\treturn errors.New(\"there was a problem with the server. Please try again later\")\n\tcase http.StatusServiceUnavailable:\n\t\treturn errors.New(\"there are temporarily offline for maintenance. please try again later\")\n\tcase http.StatusGatewayTimeout:\n\t\treturn errors.New(\"there are temporarily offline for maintenance. please try again later\")\n\tdefault:\n\t\treturn fmt.Errorf(\"unexpected status code: %d\", statusCode)\n\t}\n}\n\n// formatResponse formats the API response into readable text\nfunc (p *perplexity) formatResponse(ctx context.Context, response *CompletionResponse, query string) string {\n\tvar builder strings.Builder\n\n\t// Checking for response choices\n\tif len(response.Choices) == 0 {\n\t\treturn \"No response received from Perplexity API\"\n\t}\n\n\t// Getting the response content\n\tcontent := response.Choices[0].Message.Content\n\tbuilder.WriteString(\"# Answer\\n\\n\")\n\tbuilder.WriteString(content)","sourceCodeStart":219,"sourceCodeEnd":255,"githubUrl":"https://github.com/vxcontrol/pentagi/blob/ea665308baaff015b226f308438a68d929d0f29b/backend/pkg/tools/searchers/perplexity.go#L219-L255","documentation":"The Perplexity searcher maps HTTP 503 (Service Unavailable) from the Perplexity API to a plain error 'there are temporarily offline for maintenance. please try again later'. handleErrorResponse is invoked by search when the upstream returns a non-OK status, signaling the external search backend is temporarily down rather than a caller mistake.","triggerScenarios":"web_search (perplexity mode/engine) issues a request and Perplexity's API responds with 503 — during provider maintenance windows, capacity throttling, or an outage.","commonSituations":"Perplexity status-page incidents, rate/burst limiting showing as 503, expired plan or overloaded API causing server-side unavailability, corporate proxy returning 503 for the upstream.","solutions":["Retry the search later; 503 is transient — prefer the web_search fallback chain which can fail over to another engine","Check https://status.perplexity.ai or the provider status for an active outage","Verify the PPLX/Perplexity API key and plan are valid and not exhausted","Inspect network/proxy path for intermediaries generating the 503"],"exampleFix":"null","handlingStrategy":"retry","validationCode":"// Availability check is not practical for transient 503; validate config instead\nif (!process.env.PERPLEXITY_API_KEY) throw new Error('perplexity not configured');","typeGuard":"null","tryCatchPattern":"async function searchWithRetry(req, retries = 3) {\n  for (let i = 0; i < retries; i++) {\n    try {\n      return await webSearch({ mode: req.mode, query: req.query, engine: 'perplexity' });\n    } catch (e) {\n      if (i === retries - 1 || !/offline for maintenance|problem with .*server/i.test(String(e))) throw e;\n      await new Promise(r => setTimeout(r, 2 ** i * 1000));\n    }\n  }\n}","preventionTips":["Rely on the web_search fallback strategy so another engine serves the query","Add exponential backoff for 5xx responses","Monitor the Perplexity status page and alert on sustained 503s","Keep the API key and plan valid to avoid provider-side throttling"],"tags":["network","http","search","external-service"],"backgroundTag":"http-503-service-unavailable","analyzedSha":"ea665308baaff015b226f308438a68d929d0f29b","analyzedAt":"2026-09-01T14:16:31.421Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}