Skip to content

Commit ae8d6ab

Browse files
committed
Google Drive Error: Added console.logs for error logging
1 parent a625b95 commit ae8d6ab

File tree

2 files changed

+16
-9
lines changed

2 files changed

+16
-9
lines changed

components/google_drive/actions/create-file-from-template/create-file-from-template.mjs

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default {
88
key: "google_drive-create-file-from-template",
99
name: "Create New File From Template",
1010
description: "Create a new Google Docs file from a template. Optionally include placeholders in the template document that will get replaced from this action. [See documentation](https://www.npmjs.com/package/google-docs-mustaches)",
11-
version: "0.1.7",
11+
version: "0.1.8",
1212
type: "action",
1313
props: {
1414
googleDrive,
@@ -74,6 +74,7 @@ export default {
7474
data: this.replaceValues,
7575
});
7676
} catch (e) {
77+
console.log("Interpolate error:", e);
7778
const {
7879
code, message,
7980
} = e.error.error;
@@ -88,13 +89,19 @@ export default {
8889
/* CREATE THE PDF */
8990

9091
if (this.mode.includes(MODE_PDF)) {
91-
const pdfId = await client.export({
92-
file: googleDocId,
93-
mimeType: "application/pdf",
94-
name: this.name,
95-
destination: this.folderId,
96-
});
97-
result["pdfId"] = pdfId;
92+
try {
93+
const pdfId = await client.export({
94+
file: googleDocId,
95+
mimeType: "application/pdf",
96+
name: this.name,
97+
destination: this.folderId,
98+
});
99+
result["pdfId"] = pdfId;
100+
101+
} catch (error) {
102+
console.log("Export error:", error);
103+
throw error;
104+
}
98105
}
99106

100107
/* REMOVE THE GOOGLE DOC */

components/google_drive/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/google_drive",
3-
"version": "0.8.5",
3+
"version": "0.8.6",
44
"description": "Pipedream Google_drive Components",
55
"main": "google_drive.app.mjs",
66
"keywords": [

0 commit comments

Comments
 (0)