{"record":{"id":"e76f5a792ea37eb0","repo":"Jackett/Jackett","slug":"error-parsing-json-response-status-response-stat","errorCode":null,"errorMessage":"Error Parsing Json Response: Status={response.Status} Response={results}","messagePattern":"Error Parsing Json Response: Status=(.+?) Response=(.+?)","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/Jackett.Common/Indexers/Definitions/CardigannIndexer.cs","lineNumber":1614,"sourceCode":"                        {\n                            throw new Exception(\"Relogin failed\");\n                        }\n\n                        await TestLogin();\n\n                        response = await RequestWithCookiesAsync(searchUrl, method: method, data: queryCollection, headers: headers);\n\n                        if (response.IsRedirect && SearchPath.Followredirect)\n                        {\n                            response = await FollowIfRedirect(response);\n                        }\n\n                        results = response.ContentString;\n                    }\n\n                    if (response.Status != HttpStatusCode.OK)\n                    {\n                        throw new Exception($\"Error Parsing Json Response: Status={response.Status} Response={results}\");\n                    }\n\n                    if (response.Status == HttpStatusCode.OK\n                        && SearchPath.Response is { NoResultsMessage: not null }\n                        && (SearchPath.Response.NoResultsMessage != string.Empty && results.Contains(SearchPath.Response.NoResultsMessage) || (SearchPath.Response.NoResultsMessage == string.Empty && results == string.Empty)))\n                    {\n                        continue;\n                    }\n\n                    JToken parsedJson;\n\n                    try\n                    {\n                        parsedJson = JToken.Parse(results);\n                    }\n                    catch (JsonReaderException ex)\n                    {\n                        logger.Warn(\"Unexpected response content ({0} bytes): {1}\", response.ContentBytes.Length, response.ContentString);","sourceCodeStart":1596,"sourceCodeEnd":1632,"githubUrl":"https://github.com/Jackett/Jackett/blob/adff1941476d8057a430cf55360356c1d23e971e/src/Jackett.Common/Indexers/Definitions/CardigannIndexer.cs#L1596-L1632","documentation":"Thrown during a JSON search path after the final (post-relogin) request when `response.Status != HttpStatusCode.OK`. The message includes the HTTP status and the raw response body, indicating the search endpoint returned a non-200 (e.g. 403, 500, 503) rather than valid JSON.","triggerScenarios":"The relogin-and-retry branch completed (or was skipped) and `response.Status` is still not 200. Typical for rate limiting (429), Cloudflare/anti-bot (403/503), server errors (500/502), or an expired session the relogin could not fix.","commonSituations":"Tracker rate-limited the IP; Cloudflare/WAF block; search endpoint temporarily down; session expired and relogin failed silently upstream.","solutions":["Inspect the HTTP status code in the message: 429 → slow down; 403/503 → anti-bot/Cloudflare; 5xx → server issue, retry later.","Reduce Jackett query frequency / cap concurrent requests to the indexer.","Re-configure the indexer (credentials/cookies) if the status suggests an auth failure (401/403).","Verify the search URL path in the definition is still valid."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Before parsing, classify the status to fail fast with a clearer message.\nif (response.Status == HttpStatusCode.Forbidden || response.Status == HttpStatusCode.ServiceUnavailable)\n    logger.Warn(\"Anti-bot/rate-limit status {0}; search will fail JSON parsing.\", response.Status);","typeGuard":null,"tryCatchPattern":"try { results = await indexer.PerformQuery(query); }\ncatch (Exception ex) when (ex.Message.Contains(\"Error Parsing Json Response: Status\"))\n{ logger.Warn(\"Non-OK status from tracker; retry later. {0}\", ex.Message); await Task.Delay(backoff); }","preventionTips":["Rate-limit Jackett's query frequency to avoid 429s.","Monitor for Cloudflare/anti-bot 403/503 and handle at the network layer."],"tags":["cardigann","jackett","http","status","json","network","cloudflare"],"backgroundTag":null,"analyzedSha":"adff1941476d8057a430cf55360356c1d23e971e","analyzedAt":"2026-08-13T15:06:32.872Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}