Radarr/Radarr · error · ImportListException

Request resulted in an unexpected StatusCode [{0}]

Error message

Request resulted in an unexpected StatusCode [{0}]

What it means

Thrown by RssImportBaseParser.PreProcess when a base RSS import-list request responds with a non-200 status. It is an ImportListException carrying the ImportListResponse, raised before the feed XML is loaded. This is the generic RSS import base (distinct from the RSSImport/RSSImportParser variant) used by other RSS-style lists.

Source

Thrown at src/NzbDrone.Core/ImportLists/Rss/RssImportBaseParser.cs:67

                    itemEx.WithData("ItemTitle", item.Title());
                    throw;
                }
                catch (Exception itemEx)
                {
                    itemEx.WithData("FeedUrl", importResponse.Request.Url);
                    itemEx.WithData("ItemTitle", item.Title());
                    _logger.Error(itemEx, "An error occurred while processing feed item from {0}", importResponse.Request.Url);
                }
            }

            return movies;
        }

        protected virtual bool PreProcess(ImportListResponse importListResponse)
        {
            if (importListResponse.HttpResponse.StatusCode != HttpStatusCode.OK)
            {
                throw new ImportListException(importListResponse, "Request resulted in an unexpected StatusCode [{0}]", importListResponse.HttpResponse.StatusCode);
            }

            if (importListResponse.HttpResponse.Headers.ContentType != null && importListResponse.HttpResponse.Headers.ContentType.Contains("text/xml") &&
                importListResponse.HttpRequest.Headers.Accept != null && !importListResponse.HttpRequest.Headers.Accept.Contains("text/xml"))
            {
                throw new ImportListException(importListResponse, "Request responded with html content. Site is likely blocked or unavailable.");
            }

            return true;
        }

        protected virtual XDocument LoadXmlDocument(ImportListResponse importListResponse)
        {
            try
            {
                var content = XmlCleaner.ReplaceEntities(importListResponse.Content);
                content = XmlCleaner.ReplaceUnicode(content);

View on GitHub (pinned to ca451608dc)

Solutions

  1. Open the configured RSS URL from the Radarr host and confirm HTTP 200 + XML.
  2. Fix the URL/auth in the import-list settings.
  3. Disable the list if the source is permanently gone.
Defensive patterns

Strategy: try-catch

Validate before calling

var resp = await httpClient.GetAsync(new HttpRequest(rssSettings.Url));
if (resp.HttpResponse.StatusCode != HttpStatusCode.OK) { /* fix URL/auth, do not sync */ }

Type guard

static bool IsListStatusError(Exception ex) => ex is ImportListException ile && ile.Response?.HttpResponse?.StatusCode != HttpStatusCode.OK;

Try / catch

try { parser.ParseResponse(importResponse); }
catch (ImportListException ex) { importListStatusService.RecordFailure(definition, ex.Message); }

Prevention

When it happens

Trigger: An RSS base import-list fetch returns a non-200 status from importListResponse.HttpResponse.StatusCode — 404 wrong URL, 401/403 auth, 5xx server down, or a redirect to a non-feed location.

Common situations: Misconfigured RSS feed URL, feed moved/decommissioned, requires auth not supplied, or the source site is down.

Related errors


AI-assisted analysis of Radarr/Radarr@ca451608dc (2026-08-13). Data as JSON: /api/errors/8df8c5340bda4cf4. Report an issue: GitHub.