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

Cannot set headers after they are sent to the client #1

Open
manduda opened this issue Jan 11, 2022 · 0 comments
Open

Cannot set headers after they are sent to the client #1

manduda opened this issue Jan 11, 2022 · 0 comments

Comments

@manduda
Copy link

manduda commented Jan 11, 2022

Although the login works, it throws me this console error:

I'm using Nest Express configuration.

(Sorry if I'm not clear. It's my first issue post)

(node:13865) UnhandledPromiseRejectionWarning: Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
at new NodeError (internal/errors.js:322:7)
at ServerResponse.setHeader (_http_outgoing.js:561:11)
at ServerResponse.header (/xxxxxxx/node_modules/express/lib/response.js:771:10)
at ServerResponse.send (/xxxxxxx/node_modules/express/lib/response.js:170:12)
at ServerResponse.json (/xxxxxxx/node_modules/express/lib/response.js:267:15)
at ExpressAdapter.reply (/xxxxxxx/node_modules/@nestjs/platform-express/adapters/express-adapter.js:24:57)
at ExceptionsHandler.handleUnknownError (/xxxxxxx/node_modules/@nestjs/core/exceptions/base-exception-filter.js:33:24)
at ExceptionsHandler.catch (/xxxxxxx/node_modules/@nestjs/core/exceptions/base-exception-filter.js:17:25)
at ExceptionsHandler.next (/xxxxxxx/node_modules/@nestjs/core/exceptions/exceptions-handler.js:16:20)
at /xxxxxxx/node_modules/@nestjs/core/router/router-proxy.js:13:35
(Use node --trace-warnings ... to show where the warning was created)
(node:13865) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:13865) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant