@Override
    public HttpResponse serve(ServiceRequestContext ctx, HttpRequest req) throws Exception {
        final RoutingContext routingCtx = ctx.routingContext();

        if (routingCtx.status() == RoutingStatus.CORS_PREFLIGHT) {
            // '403 Forbidden' is better for a CORS preflight request than other statuses.
            return newFallbackResponse(ctx, HttpStatus.FORBIDDEN);
        }

        final HttpStatusException cause = routingCtx.deferredStatusException();
        if (cause == null || cause.httpStatus() == HttpStatus.NOT_FOUND) {
            return handleNotFound(ctx, routingCtx);
        }
        return newFallbackResponse(ctx, cause.httpStatus());
    }
Handles the {@link HttpRequest}s that are not matched by any user-specified {@link Route}s.
core/src/main/java/com/linecorp/armeria/server/FallbackService.java