This is my cloud script code:
handlers.testFirebase = function(args) { var bt = fbt(); if (bt == null) return false; var headers = { "Authorization": "Bearer " + bt }; var body = { LastUpdated: new Date().toISOString() }; var url = "https://xxxxx.firebaseio.com/users/5C731FBCA23062D3.json"; var content = JSON.stringify(body); var httpMethod = "PATCH"; var contentType = "application/json"; var logRequestAndResponse = true; var response = http.request(url, httpMethod, content, contentType, headers, logRequestAndResponse); return response; }
This in return gives me the following output from Postman:
{ "code": 200, "status": "OK", "data": { "FunctionName": "testFirebase", "Revision": 164, "Logs": [ { "Level": "Error", "Message": "HTTP request error", "Data": { "url": "https://xxxxx.firebaseio.com/users/5C731FBCA23062D3.json", "method": "PATCH", "content": "{}", "contentType": "application/json", "headers": { "Authorization": "Bearer <token>" }, "result": { "responseContent": null, "httpStatus": null, "httpStatusCode": 0, "requestError": "InternalError" }, "httpRequestError": "InternalError" } } ], "ExecutionTimeSeconds": 0.0898891, "ProcessorTimeSeconds": 0, "MemoryConsumedBytes": 150920, "APIRequestsIssued": 1, "HttpRequestsIssued": 1, "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 handlers.testFirebase (8C10-main.js:626:22)" } } }
What is "InternalError" and how can i view them?