feat: create a 404 response for API
Regaez opened this issue · 0 comments
Regaez commented
The API should return a 404 response for any paths requests with the /api
route that don't exist, rather than displaying Grav's HTML 404 page.
For example, https://www.mysite.com/api/some-undefined-endpoint
should return something like:
HTTP Status: 404
Content-Type: application/json
{
"message": "API endpoint not found",
"documentation": "https://github.com/regaez/grav-plugin-api/tree/master/docs"
}