You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Class Resource::ScenarioSimulator is instantiated on line lib/gocardless_pro/services/scenario_simulator_service.rb:152 with an empty un-enveloped body response, which throws an NoMethodError with message: 'undefined method [] for nil:NilClass'
The issue can be resolved by implementing the following:
lib/gocardless_pro/services/scenario_simulator_service.rb:150
** Replace return if response.body.nil? with return if response.body.nil? || response.body.empty?
The text was updated successfully, but these errors were encountered:
Submitted on behalf of merchant:
I just ran into an unexpected issue with the GoCardlessPro Ruby gem.
The issue is a Ruby exception because of some empty variable, details below.
I just ran into an unexpected response-body for calling sub-url:
/scenario_simulators/:identity/actions/run
in theGoCardlessPro::Services::ScenarioSimulatorsService.run
method. This call is made by using example: https://developer.gocardless.com/api-reference/#scenario-simulators-simulate-a-scenarioClass
Resource::ScenarioSimulator
is instantiated on linelib/gocardless_pro/services/scenario_simulator_service.rb:152
with an empty un-enveloped body response, which throws anNoMethodError
with message:'undefined method [] for nil:NilClass'
The issue can be resolved by implementing the following:
lib/gocardless_pro/services/scenario_simulator_service.rb:150
** Replace
return if response.body.nil?
withreturn if response.body.nil? || response.body.empty?
The text was updated successfully, but these errors were encountered: