Sometimes when I try to send some message through the API http://127.0.0.1:3000/client/sendMessage/sessionID I receive this error:
SyntaxError: Bad control character in string literal in JSON at position 236
at JSON.parse (<anonymous>)
at parse (/home/antonio/Documents/project-x/code/whatsapp-api/node_modules/body-parser/lib/types/json.js:89:19)
at /home/antonio/Documents/project-x/code/whatsapp-api/node_modules/body-parser/lib/read.js:128:18
at AsyncResource.runInAsyncScope (node:async_hooks:206:9)
at invokeCallback (/home/antonio/Documents/project-x/code/whatsapp-api/node_modules/raw-body/index.js:231:16)
at done (/home/antonio/Documents/project-x/code/whatsapp-api/node_modules/raw-body/index.js:220:7)
at IncomingMessage.onEnd (/home/antonio/Documents/project-x/code/whatsapp-api/node_modules/raw-body/index.js:280:7)
at IncomingMessage.emit (node:events:518:28)
at endReadableNT (node:internal/streams/readable:1696:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
SyntaxError: Bad control character in string literal in JSON at position 223
at JSON.parse (<anonymous>)
at parse (/home/antonio/Documents/project-x/code/whatsapp-api/node_modules/body-parser/lib/types/json.js:89:19)
at /home/antonio/Documents/project-x/code/whatsapp-api/node_modules/body-parser/lib/read.js:128:18
at AsyncResource.runInAsyncScope (node:async_hooks:206:9)
at invokeCallback (/home/antonio/Documents/project-x/code/whatsapp-api/node_modules/raw-body/index.js:231:16)
at done (/home/antonio/Documents/project-x/code/whatsapp-api/node_modules/raw-body/index.js:220:7)
at IncomingMessage.onEnd (/home/antonio/Documents/project-x/code/whatsapp-api/node_modules/raw-body/index.js:280:7)
at IncomingMessage.emit (node:events:518:28)
at endReadableNT (node:internal/streams/readable:1696:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
This started recently
Message
Júlia - vendedora: Claro! Para adquirir o Rosa Amazônica - Serúm, acesse o site amazonicarosa.com.br e garanta o seu. Tenho certeza de que irá adorar os resultados. Qualquer dúvida, estou por aqui. 🌿
Sometimes when I try to send some message through the API
http://127.0.0.1:3000/client/sendMessage/sessionID
I receive this error:This started recently Message
Júlia - vendedora: Claro! Para adquirir o Rosa Amazônica - Serúm, acesse o site amazonicarosa.com.br e garanta o seu. Tenho certeza de que irá adorar os resultados. Qualquer dúvida, estou por aqui. 🌿