This repository has been archived by the owner on May 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 336
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
disable showing stack for invalid requests
- Loading branch information
tkostuch
committed
Apr 9, 2020
1 parent
42df865
commit 965247f
Showing
2 changed files
with
13 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
965247f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gibkigonzo
after this commit I get:
2020-04-11 16:47:29: Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
16:47:29 0|api | at ServerResponse.setHeader (_http_outgoing.js:470:11)
16:47:29 0|api | at ServerResponse.header (/var/www/node_modules/express/lib/response.js:771:10)
16:47:29 0|api | at ServerResponse.send (/var/www/node_modules/express/lib/response.js:170:12)
16:47:29 0|api | at ServerResponse.json (/var/www/node_modules/express/lib/response.js:267:15)
16:47:29 0|api | at app.use (/var/www/src/index.ts:97:26)
16:47:29 0|api | at Layer.handle_error (/var/www/node_modules/express/lib/router/layer.js:71:5)
16:47:29 0|api | at trim_prefix (/var/www/node_modules/express/lib/router/index.js:315:13)
16:47:29 0|api | at /var/www/node_modules/express/lib/router/index.js:284:7
16:47:29 0|api | at Function.process_params (/var/www/node_modules/express/lib/router/index.js:335:12)
16:47:29 0|api | at next (/var/www/node_modules/express/lib/router/index.js:275:10)
965247f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
965247f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this change must be added at the end of the app initialization, because it needs to match only invalid routes. You have something in line 97 (16:47:29 0|api | at app.use (/var/www/src/index.ts:97:26)). So add this after all others
app.use