Hello, I’m developing a Freshdesk app and am in need of support. My issue is similar to the one experienced by the author of the post over here: Incomplete response from Google Sheets API
I’m using the FDK request method to make a post request to an internal web service. Unfortunately and unexpectedly, I’m hitting the success callback with an incomplete response, an object with only an attempts property and a value of 1. {attempts: 1}
.
My request looks like this:
client.request.post( `${baseURL}/${path}`, {
headers: {
"X-sharedsecret": secret,
"Content-Type": "application/json",
},
body: JSON.stringify(body),
maxAttempts: 5
}).then(
(envelope) => {
console.log("Response from API", path, body, envelope)
if(envelope.hasOwnProperty("response")){
try{
let data = JSON.parse(envelope.response);
resolve(data);
}catch(error){
resolve(envelope.response);
}
}else{
reject("Malformed response from FDK request proxy")
}
},
reject
);
I always see the success path with the logged response, but the response is incomplete as noted above, and as far as I can tell, the request never hits my API.