zuora_api 1.11.5 → 1.11.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 11d987d609bfd085ccf139b863d66a526efda3df111451c7d1400714fc7355a1
4
- data.tar.gz: 6842ce806646beac07d0ff4a7d65e2b794a6410915a293540e5c28d1d360326a
3
+ metadata.gz: 96d51c04ec6e65ee390a9f143f069966d12e5d3204159946a1bf2c295105153d
4
+ data.tar.gz: 9c13b7d6715eaaa6f9c1c2ca18129ebec8bf8df638928d8370b219af6864317c
5
5
  SHA512:
6
- metadata.gz: e517f2637a74f2a8447aa18dbb6350f35cba8bdb9e5ff571510f9d2f95c5c3420cab6506a8ead16e197ae7e9cf9bbe8177f95acdcb95556217a5056ecc20fd98
7
- data.tar.gz: d00f31ff3f104b7299796ff8ab39942d506dc5cc0d0711ec4baf2324e166c3fd2e3fd42e7fe3411e93893d84c942b45ecae515ca5998ea86df9d4c8b3409dd4d
6
+ metadata.gz: ee14b715f13a7e6c428b962cd0626d8f04f516a5a917e47e720088d0ccf7b9843bc8836f6fc4a4bba518af0871e52979e65c0447983b0cb5edf6af25241fa768
7
+ data.tar.gz: 48a58a517294070a1c8ef0175c578d83a107bc765faddfdd85233b93e15909d3e6ad63ee39bf08ac4874fa843f301d9e20c739c2628882f56374f270ddb8a03e
@@ -13,12 +13,13 @@ module ZuoraAPI
13
13
 
14
14
  CONNECTION_EXCEPTIONS = [
15
15
  Net::OpenTimeout,
16
- OpenSSL::SSL::SSLError,
17
- Errno::ECONNREFUSED,
18
16
  SocketError,
19
- Errno::EHOSTUNREACH,
17
+ OpenSSL::SSL::SSLError,
18
+ Errno::ECONNREFUSED, #A remote host refused to allow the network connection
19
+ Errno::EINVAL, #Invalid argument. This is used to indicate various kinds of problems with passing the wrong argument to a library function.
20
+ Errno::EHOSTUNREACH, #The remote host for a requested network connection is not reachable.
20
21
  Errno::EADDRNOTAVAIL,
21
- Errno::ETIMEDOUT,
22
+ Errno::ETIMEDOUT, #ETIMEDOUT A socket operation with a specified timeout received no response during the timeout period.
22
23
  ].freeze
23
24
 
24
25
  CONNECTION_READ_EXCEPTIONS = [
@@ -532,13 +533,21 @@ module ZuoraAPI
532
533
  rescue => ex
533
534
  raise ex
534
535
  ensure
535
- self.error_logger(ex) if defined?(ex)
536
+ if defined?(ex)
537
+ if keyword_args[:log_error_requests]
538
+ self.error_logger(ex, **keyword_args)
539
+ else
540
+ self.error_logger(ex)
541
+ end
542
+ end
536
543
  end
537
544
 
538
- def error_logger(ex)
545
+ def error_logger(ex, **args)
539
546
  return unless Rails.logger.is_a? Ougai::Logger
540
547
 
541
548
  exception_args = Rails.logger.with_fields.merge(self.exception_args(ex))
549
+ exception_args.merge!(**args) if args[:log_error_requests]
550
+
542
551
  case ex
543
552
  when ZuoraAPI::Exceptions::ZuoraAPIUnkownError, ZuoraAPI::Exceptions::ZuoraDataIntegrity
544
553
  Rails.logger.error('Zuora Unknown/Integrity Error', ex, exception_args)
@@ -548,9 +557,10 @@ module ZuoraAPI
548
557
  Rails.logger.info('Zuora APILimit Reached', ex, exception_args)
549
558
  end
550
559
  when *(ZuoraAPI::Login::ZUORA_API_ERRORS-ZuoraAPI::Login::ZUORA_SERVER_ERRORS)
551
- #Rails.logger.debug('Zuora API Error', ex, self.exception_args(ex))
560
+ Rails.logger.error('Zuora API Error', ex, exception_args) if args[:log_error_requests]
552
561
  when *ZuoraAPI::Login::ZUORA_SERVER_ERRORS
553
562
  Rails.logger.error('Zuora Server Error', ex, exception_args)
563
+ else
554
564
  end
555
565
  end
556
566
 
@@ -659,6 +669,8 @@ module ZuoraAPI
659
669
  if new_message.present?
660
670
  if new_message.include?("The query exceeded maximum processing time")
661
671
  error, message = ['TRANSACTION_FAILED', new_message.concat(" Please see KC for the Max Timeout Specification https://community.zuora.com/t5/Release-Notifications/Upcoming-Change-for-AQuA-and-Data-Source-Export-January-2021/ba-p/35024")]
672
+ elsif new_message.include?("There is no field named")
673
+ error, message = ['TRANSACTION_FAILED', new_message]
662
674
  else
663
675
  error, message = ['UNEXPECTED_ERROR', new_message]
664
676
  end
@@ -1261,7 +1273,13 @@ module ZuoraAPI
1261
1273
  rescue => ex
1262
1274
  raise ex
1263
1275
  ensure
1264
- self.error_logger(ex) if defined?(ex)
1276
+ if defined?(ex)
1277
+ if keyword_args[:log_error_requests]
1278
+ self.error_logger(ex, **keyword_args)
1279
+ else
1280
+ self.error_logger(ex)
1281
+ end
1282
+ end
1265
1283
  end
1266
1284
 
1267
1285
  def update_create_tenant
@@ -1,3 +1,3 @@
1
1
  module ZuoraAPI
2
- VERSION = "1.11.5"
2
+ VERSION = "1.11.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zuora_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.11.5
4
+ version: 1.11.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zuora Strategic Solutions Group
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-07-13 00:00:00.000000000 Z
11
+ date: 2023-10-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler