Skip to content

fix: empty page on @Render() responds with 404 #902

@jaimeadf

Description

@jaimeadf

Description

When the page specified in the @Render() decorator returns an empty string, the server responds with the status code 404 (Not Found).

Minimal code-snippet showcasing the problem

import { Controller, Get, Render } from 'routing-controllers';

@Controller()
export class MyController {
    @Get()
	@Render('index.pug') // index.pug must be empty
	index() {
		
	}
}

Expected behavior

The server should send an empty body and respond with 200 (OK).

Actual behavior

The server sends the error page and responds with 404 (Not Found).

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: needs triageIssues which needs to be reproduced to be verified report.type: fixIssues describing a broken feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions