code: private void handleNotFound(HttpServletRequest request, HttpServletResponse response) throws IOException {
  
          // Set a default response code:
          response.setStatus(HttpServletResponse.SC_NOT_FOUND);
  
          // Attempt to handle the not-found:
          Object notFoundResponse = notFound.handle(request, response);
          if (notFoundResponse != null) {
              Serialiser.serialise(response, notFoundResponse);
          }
      }
docs: Handles a request where no API endpoint is defined. If {@link #notFound}
  is set, {@link NotFound#handle(HttpServletRequest, HttpServletResponse)}
  will be called. Otherwise a simple 404 will be returned.
  
  @param request  {@link HttpServletRequest}
  @param response {@link HttpServletResponse}
  @throws IOException If an error occurs in sending the response.