on 02-22-2021 9:19 PM
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.