[PW-7079][BUG] TerminalLocalAPI try to parse returned data, even if there is no one, and fail
Describe the bug The TerminalLocalAPI try to parse an inexistant data, fail and generate a Promise rejection
To Reproduce Execute an AbortRequest on a TerminalLocalAPI (which does not return any data)
Expected behavior There is no need to try to parse data when there is no data returned, there should have a check on the data existence before parsing it
Screenshots
TypeError: Cannot read properties of undefined (reading 'NexoBlob') at NexoCrypto.decrypt ([...]\node_modules@adyen\api-library\lib\src\security\nexoCrypto.js:56:87) at AdyenTerminalAPI.request ([...]\node_modules@adyen\api-library\lib\src\services\terminalLocalAPI.js:48:42) at processTicksAndRejections (node:internal/process/task_queues:96:5)
Desktop (please complete the following information):
- OS: Windows
- Node Version: 16.15.1
- NPM Version: 7.24.0
Hi @Psychopoulet,
Thank you for raising this issue with us. It seems indeed that the empty response from the AbortRequest would cause the TerminalLocalAPI to reject the promise. We will try to fix this asap.
Best, Jilling Adyen