{"record":{"id":"168f1d16a3adab9e","repo":"Radarr/Radarr","slug":"radarr-api-call-resulted-in-an-unexpected-statusco","errorCode":null,"errorMessage":"Radarr API call resulted in an unexpected StatusCode [{0}]","messagePattern":"Radarr API call resulted in an unexpected StatusCode \\[(.+?)\\]","errorType":"exception","errorClass":"ImportListException","httpStatus":null,"severity":"error","filePath":"src/NzbDrone.Core/ImportLists/RadarrList2/RadarrList2Parser.cs","lineNumber":39,"sourceCode":"                return movies;\n            }\n\n            var jsonResponse = JsonConvert.DeserializeObject<List<MovieResource>>(importResponse.Content);\n\n            // no movies were return\n            if (jsonResponse == null)\n            {\n                return movies;\n            }\n\n            return jsonResponse.SelectList(m => new ImportListMovie { TmdbId = m.TmdbId });\n        }\n\n        protected virtual bool PreProcess(ImportListResponse listResponse)\n        {\n            if (listResponse.HttpResponse.StatusCode != HttpStatusCode.OK)\n            {\n                throw new ImportListException(listResponse,\n                    \"Radarr API call resulted in an unexpected StatusCode [{0}]\",\n                    listResponse.HttpResponse.StatusCode);\n            }\n\n            if (listResponse.HttpResponse.Headers.ContentType != null &&\n                listResponse.HttpResponse.Headers.ContentType.Contains(\"text/json\") &&\n                listResponse.HttpRequest.Headers.Accept != null &&\n                !listResponse.HttpRequest.Headers.Accept.Contains(\"text/json\"))\n            {\n                throw new ImportListException(listResponse,\n                    \"Radarr API responded with html content. Site is likely blocked or unavailable.\");\n            }\n\n            return true;\n        }\n    }\n}\n","sourceCodeStart":21,"sourceCodeEnd":57,"githubUrl":"https://github.com/Radarr/Radarr/blob/ca451608dc60c6cec754aba8d96bfa30e9468ed5/src/NzbDrone.Core/ImportLists/RadarrList2/RadarrList2Parser.cs#L21-L57","documentation":"Thrown by RadarrList2Parser.PreProcess when the Radarr list API (the Radarr-hosted list service, e.g. TMDB/imdb-derived curated lists) responds with a non-200 status. It is an ImportListException carrying the ImportListResponse. This is the upstream RadarrAPI gateway check before JSON is parsed into TmdbId list movies.","triggerScenarios":"listResponse.HttpResponse.StatusCode != HttpStatusCode.OK on a RadarrList2 fetch — e.g. 404 for an unknown list id/route, 5xx if the RadarrAPI service is degraded, or 429 throttling.","commonSituations":"The configured list id does not exist on the RadarrAPI (typo), the RadarrAPI backend is down, or a transient outage during a sync. Also when a curated list was removed upstream.","solutions":["Confirm the list id in Settings > Import Lists matches a valid RadarrAPI list (check the list provider docs).","Retry the sync after a short wait if the RadarrAPI is having a transient issue.","Disable the list if it has been removed upstream.","Inspect the logged status code (the [{0}] placeholder) to narrow the cause."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"var resp = await httpClient.GetAsync(request);\nif (resp.HttpResponse.StatusCode != HttpStatusCode.OK) { /* fix list id or wait for RadarrAPI to recover */ }","typeGuard":"static bool IsListStatusError(Exception ex) => ex is ImportListException ile && ile.Response?.HttpResponse?.StatusCode != HttpStatusCode.OK;","tryCatchPattern":"try { parser.ParseResponse(importResponse); }\ncatch (ImportListException ex) { importListStatusService.RecordFailure(definition, ex.Message); }","preventionTips":["Confirm the list id is valid on the RadarrAPI.","Retry transient RadarrAPI outages; disable lists removed upstream."],"tags":["radarr","radarrlist","import-list","http"],"backgroundTag":null,"analyzedSha":"ca451608dc60c6cec754aba8d96bfa30e9468ed5","analyzedAt":"2026-08-13T17:21:54.115Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}