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

Error running test #1

Open
palsbo opened this issue Jul 4, 2022 · 1 comment
Open

Error running test #1

palsbo opened this issue Jul 4, 2022 · 1 comment

Comments

@palsbo
Copy link

palsbo commented Jul 4, 2022

I run the following script:

const Salus = require("salus-it600"); const salus = new Salus({ username: "[email protected]", password: "mypassword" }); salus.devices().then(console.log);

and get the following response:

C:\Users\erik\OneDrive\Documents\Development\node.js\Salus>node index.js
C:\Users\erik\OneDrive\Documents\Development\node.js\Salus\node_modules\bent\src\nodejs.js:133
        return reject(new StatusError(res))
                      ^

StatusError: Internal Server Error
    at ClientRequest.<anonymous> (C:\Users\erik\OneDrive\Documents\Development\node.js\Salus\node_modules\bent\src\nodejs.js:133:23)
    at Object.onceWrapper (node:events:642:26)
    at ClientRequest.emit (node:events:527:28)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:631:27)
    at HTTPParser.parserOnHeadersComplete (node:_http_common:128:17)
    at TLSSocket.socketOnData (node:_http_client:494:22)
    at TLSSocket.emit (node:events:527:28)
    at addChunk (node:internal/streams/readable:315:12)
    at readableAddChunk (node:internal/streams/readable:289:9)
    at TLSSocket.Readable.push (node:internal/streams/readable:228:10) {
  statusCode: 500,
  json: [AsyncFunction (anonymous)],
  text: [Function (anonymous)],
  arrayBuffer: [Function (anonymous)],
  headers: {
    server: 'Apache-Coyote/1.1',
    'content-type': 'application/xml;charset=UTF-8',
    'transfer-encoding': 'chunked',
    'content-encoding': 'gzip',
    vary: 'Accept-Encoding',
    date: 'Mon, 04 Jul 2022 05:01:13 GMT',
    connection: 'close',
    'strict-transport-security': 'max-age=31536000; includeSubDomains; preload',
    'cache-control': 'private, max-age=0, no-cache, no-store'
  }
}

What am I doing wrong?
Regards Erik

@kristijanPetr
Copy link

@palsbo seems like the API has been changed and the library is outdated.

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

No branches or pull requests

2 participants