Skip to content

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

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

Closed
jaimeadf opened this issue Jul 18, 2022 · 1 comment · Fixed by #1482
Closed

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

jaimeadf opened this issue Jul 18, 2022 · 1 comment · Fixed by #1482
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
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: needs triage Issues which needs to be reproduced to be verified report. type: fix Issues describing a broken feature.
Development

Successfully merging a pull request may close this issue.

1 participant