Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jaimeadf opened this issue Jul 18, 2022 · 0 comments
Open

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

jaimeadf opened this issue Jul 18, 2022 · 0 comments
Labels
status: needs triage Issues which needs to be reproduced to be verified report. type: fix Issues describing a broken feature.

Comments

@jaimeadf
Copy link

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).

@jaimeadf jaimeadf added status: needs triage Issues which needs to be reproduced to be verified report. type: fix Issues describing a broken feature. labels Jul 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs triage Issues which needs to be reproduced to be verified report. type: fix Issues describing a broken feature.
Development

No branches or pull requests

1 participant