Skip to content

Bug: HTTP: ending response at middleware results in no log entry for request #590

Open

Description

@alpharder

Consider the following middleware:

import { HttpMiddleware, HttpRequest, HttpResponse } from '@deepkit/http';

export class AuthenticationMiddleware implements HttpMiddleware {
  constructor() {}

  async execute(
    request: HttpRequest,
    response: HttpResponse,
    next: (err?: unknown) => void,
  ) {
    response.statusCode = 403;
    response.end();
  }
}

Actual result

  • Controller routes using this middleware are NOT executed
  • Log entry for such request is NOT created

Expected result

  • Controller routes using this middleware are NOT executed
  • Log entry for such request GETS created

Activity

  1. added 2 commits that reference this issue on Jan 20, 2026
    937781e
    d25c44e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions