DRY up handling of missing parameters

Should this respond with 400 rather than 422?