salesforce-marketingcloud / FuelSDK-Python

FuelSDK for python
Other
126 stars 194 forks source link

Customizable `soap_cache_file.json` location #134

Open vsvlasov opened 3 years ago

vsvlasov commented 3 years ago

On read-only file systems (e.g. AWS Lambda) code fails when updates soap_cache_file.json Instead of raising an exception, that handled by a broad exception and returns the default endpoint URL. https://github.com/salesforce-marketingcloud/FuelSDK-Python/blob/40c9379db9ee15e712f7d0ef546b32b12e8df74b/FuelSDK/client.py#L401-L407

The next query to the default soap endpoint will return 500 Internal server error and without raising an exception debug takes an amount of time and requires deep in FuelSDK code.

Update includes:

  1. Possibility to customize soap_cache_file.json location via environment variable, constructor param, or config file.
  2. PermissionDenied exception will be raised when unable to write soap_cache_file.json