-
Notifications
You must be signed in to change notification settings - Fork 52
Closed
Labels
status/acceptedWe were able to reproduce the issue and accept to work on it.We were able to reproduce the issue and accept to work on it.
Description
I have added comments:
const dgraph = require('dgraph-js');
const dgraphClient = require('../../config/config').dgraph.client;
module.exports = {
adduser: async (tnxData) => {
let res;
const tnx = dgraphClient.newTxn();
try {
const mu = new dgraph.Mutation();
mu.setSetJson(tnxData);
// trying to get response in JSON for checking if it is success or failure
res = await (await tnx.mutate(mu)).getJson();
await tnx.commit();
} catch (e) {
throw new Error(e);
} finally {
await tnx.discard();
}
console.log(res);
return res;
},
};Following is the error I am getting:
Error: SyntaxError: Unexpected end of JSON input
Metadata
Metadata
Assignees
Labels
status/acceptedWe were able to reproduce the issue and accept to work on it.We were able to reproduce the issue and accept to work on it.