question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make sendErrorMessage response available on server

See original GitHub issue

Note: for support questions, please use one of these channels: stackoverflow or slack

You want to:

  • [] report a bug
  • request a feature

Current behaviour

Apologies if this is my misunderstanding of NodeJS streams.

The HTTP body of sendErrorMessage is readable on the client but does not appear to be accessible server side.

I’m currently investigating a number of 400 errors produced here but it looks like this could be 1 of 4 Server.errorMessages.

Are the response bodies available server side or would it be possible to add some debug logging that includes the body before sending the response?

Steps to reproduce (if the current behaviour is a bug)

Expected behaviour

Setup

  • OS:
  • browser:
  • engine.io version:

Other information (e.g. stacktraces, related issues, suggestions how to fix)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
darrachequesnecommented, May 4, 2021

Closed by https://github.com/socketio/engine.io/commit/7096e98a02295a62c8ea2aa56461d4875887092d, included in engine.io@5.1.0.

Syntax:

server.on("connection_error", (err) => {
  console.log(err.req);		// the request object
  console.log(err.code);	// the error code, for example 1
  console.log(err.message);	// the error message, for example "Session ID unknown"
  console.log(err.context);     // some additional error context
});
0reactions
Khezcommented, Mar 24, 2021

@darrachequesne any chance you can take a look through the PR so we can move this issue forward ?

I’m open to any and all suggestions 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTTP response status codes - MDN Web Docs - Mozilla
HTTP response status codes indicate whether a specific HTTP request has been successfully completed. Responses are grouped in five classes:
Read more >
Best Practices for REST API Error Handling - Baeldung
The simplest way we handle errors is to respond with an appropriate status code. Here are some common response codes: 400 Bad Request...
Read more >
Error handling - Apollo GraphQL Docs
Making errors actionable on the client and server​​ Apollo Server's variety of error codes enables requesting clients to respond differently to different error...
Read more >
How to send error http response in express/node js?
In Node with ExpressJS you can use res.status() to send the error: return res.status(400).send({ message: 'This is an error!' });.
Read more >
Troubleshooting error log messages in Microsoft Outlook ...
This error message occurs if there is a loss of network connectivity or your mail server is unavailable. To resolve this issue, check...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found