-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Description
Issue:
When a response returns as empty, the data.toString('utf-8') throws an error:
node-ebics-client/lib/Client.js
Line 228 in 4a09c8e
| const ebicsResponse = response.version(version)(data.toString('utf-8'), keys); |
Exception:
TypeError: Cannot read properties of undefined (reading 'toString')
at processTicksAndRejections (node:internal/process/task_queues:83:21)
at emitErrorNT (node:internal/streams/destroy:157:8) |
|t TLSSocket.emit (node:events:513:28) |
at TLSSocket.socketErrorListener (node:_http_client:494:9) |
at ClientRequest.emit (node:events:513:28) |
at ClientRequest.onRequestEnd (/app/node_modules/rock-req/index.js:76:16) |
at /app/node_modules/ebics-client/lib/Client.js:227:59
Solution:
Add a check for if the data is null and either resolve null or reject with a clear message.
Metadata
Metadata
Assignees
Labels
No labels