Radarr/Radarr · error · BadRequestException
movieId must be provided
Error message
movieId must be provided
What it means
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.
Source
Thrown at src/Radarr.Api.V3/Movies/RenameMovieController.cs:24
namespace Radarr.Api.V3.Movies
{
[V3ApiController("rename")]
public class RenameMovieController : Controller
{
private readonly IRenameMovieFileService _renameMovieFileService;
public RenameMovieController(IRenameMovieFileService renameMovieFileService)
{
_renameMovieFileService = renameMovieFileService;
}
[HttpGet]
public List<RenameMovieResource> GetMovies([FromQuery(Name = "movieId")] List<int> movieIds)
{
if (movieIds is not { Count: not 0 })
{
throw new BadRequestException("movieId must be provided");
}
return _renameMovieFileService.GetRenamePreviews(movieIds).ToResource();
}
}
}
View on GitHub (pinned to ca451608dc)
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.
Example fix
// before GET /api/v3/rename/movie // after GET /api/v3/rename/movie?movieId=5
Defensive patterns
Strategy: validation
Validate before calling
if (movieIds is not { Count: > 0 }) {
return BadRequest("Provide at least one movieId.");
} Type guard
static bool HasMovieIds(List<int> ids) => ids is { Count: > 0 }; Prevention
- Always pass the selected movie id when requesting rename previews.
- Disable rename-preview requests in the UI until a movie is chosen.
When it happens
Trigger: A GET /api/v3/rename/movie with no movieId query param, or with an empty movieId list.
Common situations: 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.
Related errors
- movieId or movieFileIds must be provided
- ids must be provided
- items must be provided
- movieFileIds must be provided
- Invalid field {title}, should be string or string array
AI-assisted analysis of Radarr/Radarr@ca451608dc (2026-08-13).
Data as JSON: /api/errors/fdcd0a1b092e5d0c.
Report an issue: GitHub.