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

CURB-4642 Adjustments for node 18 #210

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

SaschaKrist
Copy link

No description provided.

@SaschaKrist SaschaKrist self-assigned this Dec 19, 2024
@SaschaKrist SaschaKrist changed the title CURB-4642 Adjustments for node 18 Draft: CURB-4642 Adjustments for node 18 Dec 19, 2024
@SaschaKrist SaschaKrist changed the title Draft: CURB-4642 Adjustments for node 18 CURB-4642 Adjustments for node 18 Jan 2, 2025
@AylinUenal AylinUenal self-requested a review January 2, 2025 15:04
@@ -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) {

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.

Copy link
Contributor

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))
Copy link
Contributor

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.

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).

Copy link
Author

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",
Copy link
Contributor

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.

Copy link
Author

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) {
Copy link
Contributor

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.

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

Successfully merging this pull request may close these issues.

3 participants