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
Check if headers were sent in controller #249
Comments
It happens because returning @Get("/raw/:id")
rawExpress(@Req() req: Request, @Res() res: Response) {
res.json({ id: req.params.id })
} Does the error |
Well how embarrassing. It would seem I had an error in my code that was throwing an exception. After tracking that down, it is working. I would say that solves this bug. |
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. |
When attempting to use the response object in my controller to set up a succeed fast scenario, routing-controllers are still trying to write headers and send data when my controller finishes running. Example:
This results in error
Unhandled Promise rejection: Error: Can't set headers after they are sent.
.The text was updated successfully, but these errors were encountered: