middleware/notFound

Not found middleware. It handles 404 errors when the requested resource of the API is not found (not for views)
Description:
  • Not found middleware. It handles 404 errors when the requested resource of the API is not found (not for views)
Source:

Methods

(static) notFoundMiddleware(req, res) → {void}

Description:
  • "Not Found" middleware function. This function retrieves a json error response if there is a wrong request to an endpoint at the API.
Source:
Parameters:
Name Type Description
req Object The request object.
res Object The response object.
Returns:
- Returns nothing. It sends a response to the client.
Type
void