Error: Unexpected server response: 403
at ClientRequest. (C:\Users\xxx\Trading212-delete\node_modules\trading212\node_modules\ws\lib\websocket.js:767:7)
at ClientRequest.emit (node:events:526:28)
at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:618:27)
at HTTPParser.parserOnHeadersComplete (node:_http_common:128:17)
at TLSSocket.socketOnData (node:_http_client:482:22)
at TLSSocket.emit (node:events:526: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)
at TLSWrap.onStreamRead (node:internal/stream_base_commons:190:23)
Emitted 'error' event on WebSocket instance at:
at abortHandshake (C:\Users\xxx\Trading212-delete\node_modules\trading212\node_modules\ws\lib\websocket.js:935:15)
at ClientRequest. (C:\Users\xxx\Trading212-delete\node_modules\trading212\node_modules\ws\lib\websocket.js:767:7)
[... lines matching original stack trace ...]
at TLSSocket.Readable.push (node:internal/streams/readable:228:10)
Anyone knows what the issue is?
C:\Users\xxx\Trading212-delete>node app.js node:events:504 throw er; // Unhandled 'error' event ^
Error: Unexpected server response: 403 at ClientRequest. (C:\Users\xxx\Trading212-delete\node_modules\trading212\node_modules\ws\lib\websocket.js:767:7)
at ClientRequest.emit (node:events:526:28)
at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:618:27)
at HTTPParser.parserOnHeadersComplete (node:_http_common:128:17)
at TLSSocket.socketOnData (node:_http_client:482:22)
at TLSSocket.emit (node:events:526: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)
at TLSWrap.onStreamRead (node:internal/stream_base_commons:190:23)
Emitted 'error' event on WebSocket instance at:
at abortHandshake (C:\Users\xxx\Trading212-delete\node_modules\trading212\node_modules\ws\lib\websocket.js:935:15)
at ClientRequest. (C:\Users\xxx\Trading212-delete\node_modules\trading212\node_modules\ws\lib\websocket.js:767:7)
[... lines matching original stack trace ...]
at TLSSocket.Readable.push (node:internal/streams/readable:228:10)