Hi,
I try to insert into my database a value of field type Decimal(13, 2) and It's not working. My dataAmount value is: "14.54". I also tried with parseFloat(dataAmount) but still is not works.
const BigNumber = require('bignumber.js'); const sdkData = sdkTest.builder() .id(dataId) .amount(BigNumber(dataAmount)) .build(); await sdkTest.requestBuilder().create(sdkData) .setCustomServicePath('api/') .execute({ destinationName: 'Test', jwt: jwt }) .catch(err => { console.log('Error One:', err.message); console.log('Cause:', err.rootCause.message); console.log('Root cause:', err.rootCause.message); });
Any help!
Best
Hi,
I have already solved it just adding withCustomHeaders({ 'Content-type': 'application/json;charset=UTF-8;IEEE754Compatible=true' })
await sdkTest.requestBuilder().create(sdkData) .setCustomServicePath('api/') .withCustomHeaders({ 'Content-type': 'application/json;charset=UTF-8;IEEE754Compatible=true' }) .execute({ destinationName: 'Test', jwt: jwt }) .catch(err => { console.log('Error One:', err.message); console.log('Cause:', err.rootCause.message); console.log('Root cause:', err.rootCause.message); });
Thank you very much for your help.
Add a comment