@@ -64,7 +64,7 @@ export class Controller {
64
64
throw new ServerError ( 501 , "Fetching contacts is not implemented" ) ;
65
65
}
66
66
67
- infoLogger ( providerConfig , `Fetching contacts…` ) ;
67
+ infoLogger ( `Fetching contacts…` , providerConfig ) ;
68
68
69
69
const fetchedContacts : Contact [ ] = await this . adapter . getContacts (
70
70
providerConfig
@@ -89,7 +89,7 @@ export class Controller {
89
89
90
90
const raceResult = await Promise . race ( [ fetcherPromise , timeoutPromise ] ) ;
91
91
if ( raceResult === "TIMEOUT" ) {
92
- infoLogger ( providerConfig , `Fetching too slow, returning empty array.` ) ;
92
+ infoLogger ( `Fetching too slow, returning empty array.` , providerConfig ) ;
93
93
}
94
94
95
95
const responseContacts : Contact [ ] = Array . isArray ( raceResult )
@@ -98,7 +98,7 @@ export class Controller {
98
98
99
99
const contactsCount = responseContacts . length ;
100
100
101
- infoLogger ( providerConfig , `Found ${ contactsCount } cached contacts.` ) ;
101
+ infoLogger ( `Found ${ contactsCount } cached contacts.` , providerConfig ) ;
102
102
103
103
if (
104
104
! Array . isArray ( raceResult ) &&
@@ -116,8 +116,8 @@ export class Controller {
116
116
res . status ( 200 ) . send ( responseContacts ) ;
117
117
} catch ( error ) {
118
118
errorLogger (
119
- providerConfig ,
120
119
"Could not get contacts:" ,
120
+ providerConfig ,
121
121
error || "Unknown"
122
122
) ;
123
123
next ( error ) ;
@@ -469,14 +469,14 @@ export class Controller {
469
469
470
470
if ( shouldSkipCallEvent ( req . body as CallEvent ) ) {
471
471
infoLogger (
472
- providerConfig ,
473
- `Skipping call event for call id ${ req . body . id } `
472
+ `Skipping call event for call id ${ req . body . id } ` ,
473
+ providerConfig
474
474
) ;
475
475
res . status ( 200 ) . send ( "Skipping call event" ) ;
476
476
return ;
477
477
}
478
478
479
- infoLogger ( providerConfig , `Handling call event` ) ;
479
+ infoLogger ( `Handling call event` , providerConfig ) ;
480
480
481
481
const integrationCallEventRef = await this . adapter . handleCallEvent (
482
482
providerConfig ,
@@ -486,8 +486,8 @@ export class Controller {
486
486
res . status ( 200 ) . send ( integrationCallEventRef ) ;
487
487
} catch ( error ) {
488
488
errorLogger (
489
- providerConfig ,
490
489
"Could not handle call event:" ,
490
+ providerConfig ,
491
491
error || "Unknown"
492
492
) ;
493
493
next ( error ) ;
0 commit comments