Files
the-biergarten-app/WebAPI/Controllers/NotFoundController.cs
2026-01-13 20:10:39 -05:00

17 lines
401 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." });
}
}
}