An Edit action in ASP.NET MVC, with handling for missing id parameter
I think "BadRequest" is OK for that case. Alternative options are "PageNotFound" or "redirect to index".

Some other points about your code:


0 is usually a valid ID so I would use -1 as default, even if that is not true in your case.
You could check for null or empty first to simplify the code


.

public ActionResult Edit(int id = -1)
{
    if (id &lt; 0)
    {
        return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
    }

    string result = _foodAppService.GetById(id);
    if (string.IsNullOrEmpty(result))
    {
        return RedirectToAction("Index");
    }

    var food = JsonConvert.DeserializeObject&lt;FoodVm&gt;(result);
    return View(food);
}