Files
the-biergarten-app/API/API.Core/Controllers/NotFoundController.cs
2026-01-19 22:57:24 -05:00

17 lines
392 B
C#

using Microsoft.AspNetCore.Mvc;
namespace WebAPI.Controllers
{
[ApiController]
[ApiExplorerSettings(IgnoreApi = true)]
[Route("error")] // required
public class NotFoundController : ControllerBase
{
[HttpGet("404")] //required
public IActionResult Handle404()
{
return NotFound(new { message = "Route not found." });
}
}
}