File tree Expand file tree Collapse file tree 3 files changed +9
-15
lines changed Expand file tree Collapse file tree 3 files changed +9
-15
lines changed Original file line number Diff line number Diff line change @@ -32,10 +32,6 @@ export default {
3232 } ,
3333 } ) ;
3434
35- if ( meeting . errors ?. length ) {
36- throw new ConfigurationError ( `Error: ${ meeting . errors [ 0 ] . message } ` ) ;
37- }
38-
3935 $ . export ( "$summary" , `Successfully found meeting with ID: ${ this . meetingId } ` ) ;
4036 return meeting ;
4137 } ,
Original file line number Diff line number Diff line change @@ -32,10 +32,6 @@ export default {
3232 } ,
3333 } ) ;
3434
35- if ( user . errors ?. length ) {
36- throw new ConfigurationError ( `Error: ${ user . errors [ 0 ] . message } ` ) ;
37- }
38-
3935 const meetingId = user ?. data ?. user ?. recent_meeting ;
4036 if ( ! meetingId ) {
4137 $ . export ( "$summary" , `No meeting found for user with ID ${ this . userId } ` ) ;
@@ -51,10 +47,6 @@ export default {
5147 } ,
5248 } ) ;
5349
54- if ( meeting . errors ?. length ) {
55- throw new ConfigurationError ( `Error: ${ meeting . errors [ 0 ] . message } ` ) ;
56- }
57-
5850 $ . export ( "$summary" , `Successfully fetched the most recent meeting for user with ID ${ this . userId } ` ) ;
5951 return meeting ;
6052 } ,
Original file line number Diff line number Diff line change 1- import { axios } from "@pipedream/platform" ;
1+ import {
2+ axios , ConfigurationError ,
3+ } from "@pipedream/platform" ;
24import constants from "./common/constants.mjs" ;
35import queries from "./common/queries.mjs" ;
46
@@ -70,11 +72,15 @@ export default {
7072 } ,
7173 } ) ;
7274 } ,
73- query ( opts = { } ) {
74- return this . _makeRequest ( {
75+ async query ( opts = { } ) {
76+ const response = await this . _makeRequest ( {
7577 method : "POST" ,
7678 ...opts ,
7779 } ) ;
80+ if ( response . errors ?. length ) {
81+ throw new ConfigurationError ( `Error: ${ response . errors [ 0 ] . message } ` ) ;
82+ }
83+ return response ;
7884 } ,
7985 } ,
8086} ;
You can’t perform that action at this time.
0 commit comments