Skip to content

Commit 02d0b04

Browse files
Merge pull request #6 from ScriptAddicts/FPR-859
FPR-859 Add logs for transforming into MS file utility
2 parents 8157f6d + 79ef736 commit 02d0b04

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@scriptaddicts/docsserviceapp",
3-
"version": "1.0.7",
3+
"version": "1.0.8",
44
"description": "Fork of DocsServiceApp to continue support of the library",
55
"main": "index.js",
66
"scripts": {

src/apps/SpreadsheetApp/SpreadsheetAppp.js

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,22 @@
249249
gToM = function () {
250250
var obj, url;
251251
url = `https://www.googleapis.com/drive/v3/files/${this.obj.spreadsheetId}/export?mimeType=${MimeType.MICROSOFT_EXCEL}`;
252-
obj = UrlFetchApp.fetch(url, {
253-
headers: this.headers,
254-
});
252+
console.log(
253+
"[FPR-859] Requesting MS export",
254+
"Library object ->",
255+
JSON.stringify(this.obj || {}),
256+
"Request URL ->",
257+
url
258+
)
259+
try {
260+
console.log("[FPR-859] Request headers -> ", JSON.stringify(this.headers || {}))
261+
obj = UrlFetchApp.fetch(url, {
262+
headers: this.headers,
263+
});
264+
console.log("[FPR-859] Successfull MS file export response ->", obj.getResponseCode())
265+
} catch (err) {
266+
console.log("[FPR-859] Errored MS file export response -> ", obj.getResponseCode())
267+
}
255268
if (obj.getResponseCode() !== 200) {
256269
putError.call(
257270
this,

0 commit comments

Comments
 (0)