{"record":{"id":"3f9ddb8708720771","repo":"Jackett/Jackett","slug":"unknown-or-missing-parameters","errorCode":null,"errorMessage":"Unknown or missing parameters","messagePattern":"Unknown or missing parameters","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/Jackett.Common/Indexers/Definitions/TorrentSyndikat.cs","lineNumber":297,"sourceCode":"\n            return releases;\n        }\n\n        public override async Task<byte[]> Download(Uri link)\n        {\n            var response = await RequestWithCookiesAsync(link.ToString() + \"&apikey=\" + ConfigData.Key.Value, string.Empty);\n            CheckResponseStatus(response.Status, \"download\");\n            return response.ContentBytes;\n        }\n\n        private static void CheckResponseStatus(HttpStatusCode status, string scope)\n        {\n            switch (status)\n            {\n                case HttpStatusCode.OK:\n                    return;\n                case HttpStatusCode.BadRequest:\n                    throw new Exception(\"Unknown or missing parameters\");\n                case HttpStatusCode.Unauthorized:\n                    throw new Exception(\"Wrong API-Key\");\n                case HttpStatusCode.Forbidden:\n                    throw new Exception(\"API-Key has no authorization for the endpoint / scope \" + scope);\n                default:\n                    throw new Exception(\"Unexpected response status code \" + status);\n            }\n        }\n    }\n}\n","sourceCodeStart":279,"sourceCodeEnd":308,"githubUrl":"https://github.com/Jackett/Jackett/blob/adff1941476d8057a430cf55360356c1d23e971e/src/Jackett.Common/Indexers/Definitions/TorrentSyndikat.cs#L279-L308","documentation":"Thrown by TorrentSyndikat.CheckResponseStatus when the download endpoint returns HTTP 400 BadRequest. The switch maps each status to a fixed message; 400 is reported as 'Unknown or missing parameters', indicating the request URL/body the client built is malformed rather than an auth problem.","triggerScenarios":"The Download method calls RequestWithCookiesAsync(link + \"&apikey=\" + key) and the response.Status is HttpStatusCode.BadRequest, so CheckResponseStatus maps it to this exception.","commonSituations":"The release link passed to Download is missing a required query parameter (id, hash) because the indexer's parse step changed format; the apikey is empty so the concatenated URL is malformed; the site's download endpoint contract changed to require an extra parameter.","solutions":["Inspect the exact URL passed to RequestWithCookiesAsync in Download: confirm it includes the id/token and the apikey is non-empty.","Validate ConfigData.Key.Value is set before calling Download (guard at the download boundary).","Update the indexer's release-link parsing if the site changed how download links are embedded in search results."],"exampleFix":"// before\nvar response = await RequestWithCookiesAsync(link.ToString() + \"&apikey=\" + ConfigData.Key.Value, string.Empty);\nCheckResponseStatus(response.Status, \"download\");\n\n// after - validate inputs before the request\nif (string.IsNullOrWhiteSpace(ConfigData.Key.Value))\n    throw new Exception(\"TorrentSyndikat API key is empty; cannot download.\");\nvar response = await RequestWithCookiesAsync(link.ToString() + \"&apikey=\" + ConfigData.Key.Value, string.Empty);\nCheckResponseStatus(response.Status, \"download\");","handlingStrategy":"validation","validationCode":"// Validate the download URL and key before issuing the request\nif (link == null || string.IsNullOrWhiteSpace(link.Query))\n    throw new InvalidOperationException(\"TorrentSyndikat download link is missing query parameters.\");\nif (string.IsNullOrWhiteSpace(ConfigData.Key.Value))\n    throw new InvalidOperationException(\"TorrentSyndikat API key is empty; cannot download.\");","typeGuard":"static bool IsValidDownloadLink(Uri link) =>\n    link != null && !string.IsNullOrWhiteSpace(link.Query) && link.Query.Contains(\"id=\");","tryCatchPattern":"try\n{\n    var response = await RequestWithCookiesAsync(link.ToString() + \"&apikey=\" + ConfigData.Key.Value, string.Empty);\n    CheckResponseStatus(response.Status, \"download\");\n}\ncatch (Exception ex) when (ex.Message == \"Unknown or missing parameters\")\n{\n    // 400: the link is malformed; re-derive it from a fresh search result\n    logger.Warn($\"TorrentSyndikat download link rejected as malformed: {link}\");\n    throw;\n}","preventionTips":["Ensure release download links are parsed with the required id/token parameter.","Normalize the API key (trim whitespace) before concatenating into the URL.","Treat 400 on download as a parse/format defect in the release link and re-fetch the release."],"tags":["http-status","validation","download","torrentsyndikat"],"backgroundTag":null,"analyzedSha":"adff1941476d8057a430cf55360356c1d23e971e","analyzedAt":"2026-08-13T15:06:32.872Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}