Hello ! I am sending an http.request to an API that I know is reliable and works. When going through Postman, everything goes through and I receive the response. When going through Cloudscript and logging the request directly, it also returns me the response, but it also errors at the same time and prevents the function from continuing.
Below is the request and the error code it returns (please keep in mind that it is logging the correct response and is perfectly working on the APIs side, just erroring on Playfab and breaking my handler) :
var url = "validurl" var method = "post"; var body = { wax_account: String(playersToSendTokenWAX), // Receiver Accounts quantity: tokenRewardQuantityWAX , // Amount of WAX to be sent memo: args.situation // Memo for the transaction, needs to be in even if empty }; var content = JSON.stringify(body); var contentType = "application/json"; var headers = { Authorization: "ithasonebutnotsharingit" }; var responseTokenWAX = http.request(url,method,content,contentType,headers); // Send Tokens (ERROR IS HERE) globalResponse['responseTokenWAX'] = JSON.parse(responseTokenWAX); }
"Error": { "Error": "CloudScriptHTTPRequestError", "Message": "The script made an external HTTP request, which returned an error. See the Error logs for details.", "StackTrace": "Error\n at Object.http_request (Script:226:28)\n at Object.request (Script:265:35)\n at handlers.Testing (9CE70-main.js:232:37)\n at Object.invokeFunction (Script:117:33)" }