0

A nodejs application, which uses a library I've written throws an error like this:

{
  "error": {
    "code": 500,
    "message": "SyntaxError: Unexpected token \r",
    "debug": "536585744307add1ab4e847288a0a3fb4a5cb4a73c1836a14ab98a026fc1f9315125443b33a07f1e60f7a3fea20f064bda848b6aba8bfb7a0b8c8aa8cd5e5b355815f93c1ed0366696909ab2aebdb98343ca4d2f11e9e2b9f0bcfef7e8b8b5a7d7335308"
  }
}

In this example I've replaced the content of debug with random hexadecimal numbers, in the real scenario, there are over 3000 characters.

Unfortunately I can't get my hands on the whole application, so I wanted to know if that is in some configuration a default behaviour by nodejs and how I might be able to read the content of debug.

Update:

It might not have been obvious, but it's an HTTP 500 error. The application uses ExpressJS and the tests were executed with Postman.

6
  • Is the hexa of the actual error just gibberish when translated to ASCII/Unicode or is it a format issue? Commented Aug 31, 2015 at 9:40
  • the quick online converter I've found only returned gibberish (rapidtables.com/convert/number/hex-to-ascii.htm) Commented Aug 31, 2015 at 9:43
  • This is application-specific, I'm not aware of any Node.js internals that would use this. Commented Aug 31, 2015 at 10:13
  • ok thx. I just saw that I've forgotten to mention, that it's an express-based application and the error is a HTTP 500 error due to an internal SyntaxError. But maybe it was already clear for you based on the error code 500. Commented Aug 31, 2015 at 10:20
  • @Peter my guess is that the app is using a custom error handler to generate the error and add the debug property (perhaps some sort of identifier to trace the error in an external system, although 3K sounds rather large for that; perhaps it's a compressed document of some sorts?) Commented Aug 31, 2015 at 10:28

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.