using Microsoft.AspNetCore.Mvc;
namespace API.Core.Controllers;
///
/// Handles requests that do not match any other route, used as the application's fallback controller.
///
///
/// Wired up as the fallback target via app.MapFallbackToController("Handle404", "NotFound") in
/// Program.cs.
///
[ApiController]
[ApiExplorerSettings(IgnoreApi = true)]
[Route("error")] // required
public class NotFoundController : ControllerBase
{
[HttpGet("404")] //required
public IActionResult Handle404()
{
return NotFound(new { message = "Route not found." });
}
}