Jackett/Jackett · error · Exception
Unexpected response status '{indexerResponse.WebResponse.Sta
Error message
Unexpected response status '{indexerResponse.WebResponse.Status}' code from indexer request What it means
Thrown by KnabenParser.ParseResponse when the HTTP response status is anything other than 200 OK. Before attempting JSON deserialization, the parser checks the status code; any non-OK status (including redirects, client errors, and server errors) triggers this exception with the actual status embedded. Redirects are logged as warnings before the throw.
Source
Thrown at src/Jackett.Common/Indexers/Definitions/Knaben.cs:253
private static readonly Regex _DateTimezoneRegex = new Regex(@"[+-]\d{2}:\d{2}$", RegexOptions.Compiled);
public KnabenParser(TorznabCapabilitiesCategories categories, Logger logger)
{
_categories = categories;
_logger = logger;
}
public IList<ReleaseInfo> ParseResponse(IndexerResponse indexerResponse)
{
if (indexerResponse.WebResponse.Status != HttpStatusCode.OK)
{
if (indexerResponse.WebResponse.IsRedirect)
{
_logger.Warn("Redirected to {0} from indexer request", indexerResponse.WebResponse.RedirectingTo);
}
throw new Exception($"Unexpected response status '{indexerResponse.WebResponse.Status}' code from indexer request");
}
var releases = new List<ReleaseInfo>();
var jsonResponse = JsonConvert.DeserializeObject<KnabenResponse>(indexerResponse.Content);
_logger.Debug(jsonResponse.ToString());
if (jsonResponse?.Hits == null)
{
return releases;
}
var rows = jsonResponse.Hits.Where(r => r.Seeders > 0).ToList();
foreach (var row in rows)
{
// Not all entries have the TZ in the "date" field
var publishDate = row.Date.IsNotNullOrWhiteSpace() && !_DateTimezoneRegex.IsMatch(row.Date) ? $"{row.Date}+01:00" : row.Date;View on GitHub (pinned to adff194147)
Solutions
- Read the embedded status value — 429 means slow down, 5xx means server-side issue, 4xx means check auth/URL.
- For 429, reduce the indexer's query interval or disable automatic refresh temporarily.
- For 5xx, wait and retry — the Knaben server is likely transiently unavailable.
- For 404, verify the Knaben API endpoint URL is current.
- Confirm network connectivity and absence of proxy/firewall interference.
Defensive patterns
Strategy: retry
Type guard
static bool IsRetryableStatus(HttpStatusCode status)
{
return status == HttpStatusCode.TooManyRequests
|| (int)status >= 500;
} Try / catch
try
{
var releases = indexer.GetParser().ParseResponse(indexerResponse);
}
catch (Exception ex) when (ex.Message.Contains("Unexpected response status"))
{
// Extract the status from the message to decide retry vs. fail
logger.Error("Knaben HTTP error: {Message}", ex.Message);
if (ex.Message.Contains("429") || ex.Message.Contains("503"))
{
// Retry with backoff
}
} Prevention
- Read the embedded status code — 429 means slow down, 5xx means server-side.
- Reduce query frequency for 429 responses.
- Retry with backoff for 5xx errors — they are typically transient.
- Verify the endpoint URL for persistent 404 errors.
When it happens
Trigger: The Knaben API returns a non-200 HTTP status: 429 (rate limited), 500/502/503 (server error or maintenance), 401/403 (auth required), or a 3xx redirect that was not followed.
Common situations: Knaben rate-limits the requesting IP; the API is under maintenance returning 503; a CDN/gateway returns 502; the endpoint was moved and returns 404; a reverse proxy returns a redirect to a new URL.
Related errors
- Invalid status code {(int)response.Status} ({response.Status
- Unknown error in search: {response.ContentString}
- HDBits returned an error with status code + (int)json["stat
- Could not find releases from this URL
- {error}
AI-assisted analysis of Jackett/Jackett@adff194147 (2026-08-13).
Data as JSON: /api/errors/3b4109ad28bb5cf5.
Report an issue: GitHub.