-
Notifications
You must be signed in to change notification settings - Fork 1
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
CURB-4642 Adjustments for node 18 #210
base: master
Are you sure you want to change the base?
Conversation
@@ -116,7 +116,7 @@ class RapidApi { | |||
* @param {Object} req The request object. | |||
* @param {Object} res The response object. | |||
*/ | |||
handle (req, res) { | |||
handle (req, res, next) { |
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.
why did you introduce next in these two files? it is not being used.
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.
without it the sdk throws errors. there are situations where it needs to be invoked, but i've checked the code and it seems that we don't have any of those.
@@ -129,19 +129,19 @@ class RapidDevServer { | |||
// Create RAPID API. | |||
this.rapidApi.init(() => { | |||
// Handle pipeline requests. | |||
this.server.opts('/', (req, res) => res.send(200)) | |||
this.server.opts('/', (req, res, next) => res.send(200)) |
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.
next
also need to be added here.
otherwise i get an error in the console when i start the backend.
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.
me too, I get this error in the backend console: ERROR: Could not start CLI-Proxy AssertionError [ERR_ASSERTION]: Handler [handler-0 on GET /status] is missing a third argument (the "next" callback) but is not an async function. Middleware handlers can be either async/await or callback-based.Callback-based (non-async) handlers should accept three arguments: (req, res, next). Async handler functions should accept maximum of 2 arguments: (req, res).
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.
done
package.json
Outdated
@@ -74,7 +74,7 @@ | |||
"replace-in-file": "3.4.4", | |||
"request": "2.88.0", | |||
"request-promise-native": "1.0.7", | |||
"restify": "8.4.0", | |||
"restify": "^11.1.0", |
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.
most of the packages are pinned to a specific version. i'd recommend to also keep that for this package.
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.
done
@@ -116,7 +116,7 @@ class RapidApi { | |||
* @param {Object} req The request object. | |||
* @param {Object} res The response object. | |||
*/ | |||
handle (req, res) { | |||
handle (req, res, next) { |
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.
without it the sdk throws errors. there are situations where it needs to be invoked, but i've checked the code and it seems that we don't have any of those.
No description provided.