using Microsoft.AspNetCore.Mvc;

namespace ladaexpress.vn.Controllers
{
    public class StatusController : Controller
    {
        public IActionResult NotFound()
        {
            return View();
        }

        [Route("/Status/HandleError/{code:int}")]
        public IActionResult HandleError(int code)
        {
            switch (code)
            {
                case 404:
                    return RedirectToAction("NotFound");
                default:
                    break;
            }
            ViewData["ErrorMessage"] = $"Error occurred. The ErrorCode is: {code}";
            return View();
        }
    }
}
