{"record":{"id":"fdcd0a1b092e5d0c","repo":"Radarr/Radarr","slug":"movieid-must-be-provided","errorCode":null,"errorMessage":"movieId must be provided","messagePattern":"movieId must be provided","errorType":"http","errorClass":"BadRequestException","httpStatus":400,"severity":"error","filePath":"src/Radarr.Api.V3/Movies/RenameMovieController.cs","lineNumber":24,"sourceCode":"\nnamespace Radarr.Api.V3.Movies\n{\n    [V3ApiController(\"rename\")]\n    public class RenameMovieController : Controller\n    {\n        private readonly IRenameMovieFileService _renameMovieFileService;\n\n        public RenameMovieController(IRenameMovieFileService renameMovieFileService)\n        {\n            _renameMovieFileService = renameMovieFileService;\n        }\n\n        [HttpGet]\n        public List<RenameMovieResource> GetMovies([FromQuery(Name = \"movieId\")] List<int> movieIds)\n        {\n            if (movieIds is not { Count: not 0 })\n            {\n                throw new BadRequestException(\"movieId must be provided\");\n            }\n\n            return _renameMovieFileService.GetRenamePreviews(movieIds).ToResource();\n        }\n    }\n}\n","sourceCodeStart":6,"sourceCodeEnd":31,"githubUrl":"https://github.com/Radarr/Radarr/blob/ca451608dc60c6cec754aba8d96bfa30e9468ed5/src/Radarr.Api.V3/Movies/RenameMovieController.cs#L6-L31","documentation":"Thrown by GET /api/v3/rename/movie when the movieId query parameter is absent or empty. Rename previews are computed per-movie, so at least one movieId must be supplied; the pattern `movieIds is not { Count: not 0 }` rejects null and empty lists.","triggerScenarios":"A GET /api/v3/rename/movie with no movieId query param, or with an empty movieId list.","commonSituations":"Calling the rename preview endpoint before selecting a movie; a UI path that fires the request on load without a movie context; a malformed query string.","solutions":["Append at least one movieId to the request: GET /api/v3/rename/movie?movieId=5.","Ensure the UI passes the currently selected movie's id before requesting a rename preview."],"exampleFix":"// before\nGET /api/v3/rename/movie\n// after\nGET /api/v3/rename/movie?movieId=5","handlingStrategy":"validation","validationCode":"if (movieIds is not { Count: > 0 }) {\n    return BadRequest(\"Provide at least one movieId.\");\n}","typeGuard":"static bool HasMovieIds(List<int> ids) => ids is { Count: > 0 };","tryCatchPattern":null,"preventionTips":["Always pass the selected movie id when requesting rename previews.","Disable rename-preview requests in the UI until a movie is chosen."],"tags":["api","validation","rename","bad-request","query-params"],"backgroundTag":null,"analyzedSha":"ca451608dc60c6cec754aba8d96bfa30e9468ed5","analyzedAt":"2026-08-13T17:21:54.115Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}