File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,15 @@ def determine_stack(endpoint_service_url=nil)
1919 refresh unless self . auth_token
2020 options = { 'params' => { 'access_token' => self . auth_token } }
2121 response = get ( endpoint_service_url || "https://www.exacttargetapis.com/platform/v1/endpoints/soap" , options )
22- raise 'Unable to determine stack' unless response . success?
22+
23+ unless response . success?
24+ # if unsuccessful, force refresh token and try with new token before raising exception
25+ refresh!
26+ options = { 'params' => { 'access_token' => self . auth_token } }
27+ response = get ( endpoint_service_url || "https://www.exacttargetapis.com/platform/v1/endpoints/soap" , options )
28+
29+ raise "Unable to determine stack #{ response . code } , #{ response . body . inspect } " unless response . success?
30+ end
2331 response [ 'url' ]
2432 end
2533end
Original file line number Diff line number Diff line change 11module FuelSDK
2- VERSION = "0.1.11 "
2+ VERSION = "0.1.12 "
33end
You can’t perform that action at this time.
0 commit comments