File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,12 @@ def self.client_init(config_opts)
45
45
imported_options = USER_CONFIGURABLE_GLOBAL_OPTIONS - StripeClient ::CLIENT_OPTIONS
46
46
client_config = StripeConfiguration . setup do |instance |
47
47
imported_options . each do |key |
48
- instance . public_send ( "#{ key } =" , global_config . public_send ( key ) ) if global_config . respond_to? ( key )
48
+ begin
49
+ instance . public_send ( "#{ key } =" , global_config . public_send ( key ) ) if global_config . respond_to? ( key )
50
+ rescue NotImplementedError => e
51
+ # In Ruby <= 2.5, we can't set write_timeout on Net::HTTP, log an error and continue
52
+ Util . log_error ( "Failed to set #{ key } on client configuration: #{ e } " )
53
+ end
49
54
end
50
55
end
51
56
client_config . reverse_duplicate_merge ( config_opts )
You can’t perform that action at this time.
0 commit comments