File tree Expand file tree Collapse file tree 3 files changed +24
-18
lines changed Expand file tree Collapse file tree 3 files changed +24
-18
lines changed Original file line number Diff line number Diff line change
1
+ ## 2.4.2 (November 18, 2022)
2
+ * Improved error handling in ` Lookup Objects ` action
3
+
1
4
## 2.4.1 (October 07, 2022)
2
5
* Fixed loop issue when records equal to ` Size of Polling Page ` and have same ` LastModifiedDate ` in ` Get Updated Objects Polling ` trigger
3
6
* Update Sailor version to 2.7.0
Original file line number Diff line number Diff line change 3
3
"description" : " Customer relationship management (CRM) software & cloud computing from the leader in CRM solutions for businesses large & small." ,
4
4
"docsUrl" : " https://github.com/elasticio/salesforce-component-v2" ,
5
5
"url" : " http://www.salesforce.com/" ,
6
- "version" : " 2.4.1 " ,
6
+ "version" : " 2.4.2 " ,
7
7
"authClientTypes" : [
8
8
" oauth2"
9
9
],
Original file line number Diff line number Diff line change @@ -223,23 +223,26 @@ class SalesForceClient {
223
223
const includeDeleted = options . includeDeleted || this . configuration . includeDeleted ;
224
224
const { wherePart, offset, limit } = options ;
225
225
try {
226
- await this . connection . sobject ( sobject )
227
- . select ( '*' )
228
- . where ( wherePart )
229
- . offset ( offset )
230
- . limit ( limit )
231
- . scanAll ( includeDeleted )
232
- . on ( 'error' , ( err ) => {
233
- this . logger . error ( 'Salesforce returned an error' ) ;
234
- throw err ;
235
- } )
236
- . on ( 'record' , ( record ) => {
237
- records . push ( record ) ;
238
- } )
239
- . on ( 'end' , ( ) => {
240
- this . logger . debug ( 'Found %s records' , records . length ) ;
241
- } )
242
- . execute ( { autoFetch : true , maxFetch : limit } ) ;
226
+ await new Promise ( ( resolve , reject ) => {
227
+ this . connection . sobject ( sobject )
228
+ . select ( '*' )
229
+ . where ( wherePart )
230
+ . offset ( offset )
231
+ . limit ( limit )
232
+ . scanAll ( includeDeleted )
233
+ . on ( 'error' , ( err ) => {
234
+ this . logger . error ( 'Salesforce returned an error' ) ;
235
+ reject ( err ) ;
236
+ } )
237
+ . on ( 'record' , ( record ) => {
238
+ records . push ( record ) ;
239
+ } )
240
+ . on ( 'end' , ( ) => {
241
+ this . logger . debug ( 'Found %s records' , records . length ) ;
242
+ resolve ( ) ;
243
+ } )
244
+ . execute ( { autoFetch : true , maxFetch : limit } ) ;
245
+ } ) ;
243
246
} catch ( e ) {
244
247
this . logger . error ( 'Lookup query failed' ) ;
245
248
throw e ;
You can’t perform that action at this time.
0 commit comments