I initiated a small node js project in which I installed the sdk module in order to communicate with horizon and try out some things, I am following this page from the docs.
However I getting an error. As far as I understand it comes from this line:
const transactionResult = await server.submitTransaction(transaction);
Here is the error log(the log is too long so I will just copy paste the first lines:
An error has occured:
{ Error: Request failed with status code 400
at createError (/home/ubuntu/workspace/docker_stellar/myserver/myapp/node_modules/axios/lib/core/createError.js:16:15)
at settle (/home/ubuntu/workspace/docker_stellar/myserver/myapp/node_modules/axios/lib/core/settle.js:18:12)
at IncomingMessage.handleStreamEnd (/home/ubuntu/workspace/docker_stellar/myserver/myapp/node_modules/axios/lib/adapters/http.js:201:11)
at emitNone (events.js:111:20)
at IncomingMessage.emit (events.js:208:7)
at endReadableNT (streamreadable.js:1064:12)
at combinedTickCallback (internal/process/nexttick.js:139:11)
at process.tickCallback (internal/process/nexttick.js:181:9)
config:
{ adapter: [Function: httpAdapter],
transformRequest: { '0': [Function: transformRequest] },
transformResponse: { '0': [Function: transformResponse] },
timeout: 60000,
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
validateStatus: [Function: validateStatus],
headers:
{ Accept: 'application/json, text/plain, /',
'Content-Type': 'application/x-www-form-urlencoded',
'X-Client-Name': 'js-stellar-sdk',
'X-Client-Version': '0.15.3',
'User-Agent': 'axios/0.18.0',
'Content-Length': 303 },
method: 'post',
url: 'https://horizon-testnet.stellar.org/transactions',
data: 'tx=AAAAAMKEdM3SKNa%2BVS2IcCHh0hbJpC9eKFwi%2BzFTRdqph9JMAAAAZAAAQT0AAAADAAAAAQAAAAAAAAAAAAAAAFzBqDoAAAAAAAAAAQAAAAAAAAABAAAAACzn9ykXx%2FXpZb2ztFecMWAVIjl3oeMoMzNlQuq2igQ 9AAAAAAAAAADQsJmHAAAAAAAAAAGph9JMAAAAQH1pa8aof1o81B7aUJ8XPIKBU%2BDuw%2F9DZLQ7HoS3ueS2RkGlm%2BkUoAQFAi0jmdIsC841ojzyOmMZyjZBo%2BTSEws%3D' },
request:
ClientRequest {
...
Please if anyone has any idea why i'm having this error I would really appreciate the help.
response
?