Open WithSecureSamiTikka opened 7 years ago
It appears that the errors are caused by an extra call to the API performed in the background whenever the SOAP api is used: https://github.com/salesforce-marketingcloud/FuelSDK-Node/blob/master/lib/ET_Client.js#L79-L86
That request happens outside all normal control flow and no one is handling the response. If that request fails for one reason or another (in this case the Lambda function container was frozen for some minutes while the request was still in-flight), the error will be converted into an uncaught exception and causing the process to crash.
Git history reveals that this code was added in PR #6. @amagar088, what was the reason for adding this extra request to the library? Could this phone-home functionality be implemented in some other way as part of the normal processing flow so that errors from that can be handled by the application?
We run AWS Lambda function which uses FuelSDK to update a Data Extension. We recently upgraded the SDK from 1.1.8 to 2.1.0. After the upgrade the lambda function started crashing with following errors
Also
These errors seem to mostly happen during slow traffic hours and before the error there has been 1-2 minutes of idle time. My hypothesis is the Exact Target server side has closed the socket and because that is not handled, it causes an exception which kills the process.
Has something changed in the SDK because this problem started happening after the SDK upgrade?
According to the logs, the exception occurs before any of our code runs in the lambda function, making it impossible to put a try+catch around it. Would it be possible to either: