zuora_api 1.7.66g → 1.7.66l

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dd393a41c8c3cf0854d5ac12b6ad87c2b2563f9347b0f4124e1ad3fbfb477df9
4
- data.tar.gz: 6638cdbc20f485a18a94f9808f72e263605ec28d937a86950774d43638ad9334
3
+ metadata.gz: c1e7148b986fd12ca03a813e2788cdea607566dd9b48e10d034a23c9f8d44a86
4
+ data.tar.gz: def4d7bf9687461ec02fef191f698d526b3235fd241c46b90783e9e430da7b51
5
5
  SHA512:
6
- metadata.gz: 05b50f2f78772ca52b9649131c1ff43d8b1909cb6fc5dc4074be9699ff9baa42c9d49131e4c5120b826e048e4a72ee65d056431f9efabc8071717e8183ff1d0a
7
- data.tar.gz: dc4f45572be1b44ad33d7941a271368436bc034e894d7d483a6f590bea6eec128d5c50146f1101a2ceadd57c41be8322fe60aac6c099f7fc7fd3b5a4dc2d3253
6
+ metadata.gz: 97c0a7a74b952ff7cc6216e62fbff45b291e99b7624d51334f5316c485ab3c0c471078253f5d7a56a8e50145b44a12cf566fb36bf0c7dd700a3484e9a349479a
7
+ data.tar.gz: 42f3e28cfaefe1dcdd4062ec5bea73b692187f8b3c3b0d20d3623d1bb0354cee02d7d47420b9a8074835fa2fb8765737f575f9f6100960400f3c8b92b899a854
@@ -616,7 +616,7 @@ module ZuoraAPI
616
616
  path: ex.response.request.path.to_s,
617
617
  method: ex.response.request.http_method.to_s.split("Net::HTTP::").last.upcase,
618
618
  params: ex.response.request.raw_body.to_s,
619
- headers: ex.response.request.options[:headers].map{|k,v| [k, k.downcase.strip == "authorization" ? "VALUE FILTERED" : v]}.to_h.to_s,
619
+ headers: ex.response.request.options[:headers].map{|k,v| [k.to_s, k.to_s.downcase.strip == "authorization" ? "VALUE FILTERED" : v]}.to_h.to_s,
620
620
  },
621
621
  response: {
622
622
  status: ex.response.code,
@@ -632,7 +632,7 @@ module ZuoraAPI
632
632
  path: ex.request.path.to_s,
633
633
  method: ex.request.http_method.to_s.split("Net::HTTP::").last.upcase,
634
634
  params: ex.request.options[:body],
635
- headers: ex.request.options[:headers].map{|k,v| [k, k.downcase.strip == "authorization" ? "VALUE FILTERED" : v]}.to_h.to_s
635
+ headers: ex.request.options[:headers].map{|k,v| [k.to_s, k.to_s.downcase.strip == "authorization" ? "VALUE FILTERED" : v]}.to_h.to_s
636
636
  }
637
637
  })
638
638
  args.merge!({
@@ -697,12 +697,12 @@ module ZuoraAPI
697
697
  ).present?
698
698
  result = body.xpath('//ns2:Status', 'ns2' => 'http://object.api.zuora.com/').text
699
699
  if result == 'Failed'
700
- reason = body.xpath('//ns2:StatusReason', 'ns2' => 'http://object.api.zuora.com/').text
701
- if reason.present?
702
- message = body.xpath('//ns2:StatusReason', 'ns2' => 'http://object.api.zuora.com/').text
703
- error = message.match(/^[\w\d]{16}\: (Unexpected error.|No HTTP Response|Socket Timeout|There is an internal error, please try again later)/).present? ? 'UNEXPECTED_ERROR' : 'FATAL_ERROR'
700
+ message = body.xpath('//ns2:StatusReason', 'ns2' => 'http://object.api.zuora.com/').text
701
+ error = 'FATAL_ERROR'
702
+ if message.present?
703
+ identifier, new_message = message.scan(/^([\w\d]{16})\: (.*)/).first
704
+ error, message = ['UNEXPECTED_ERROR', new_message] if new_message.present?
704
705
  else
705
- error = 'FATAL_ERROR'
706
706
  message = 'Export failed due to unknown reason. Consult api logs.'
707
707
  end
708
708
  end
@@ -925,6 +925,8 @@ module ZuoraAPI
925
925
  raise ZuoraAPI::Exceptions::ZuoraAPIConnectionTimeout.new(error_message, response)
926
926
  when /Client sent a bad request./, /Bad Request/, /403 Forbidden/
927
927
  raise ZuoraAPI::Exceptions::ZuoraAPIInternalServerError.new(error_message, response)
928
+ when /414 Request-URI Too Large/
929
+ raise ZuoraAPI::Exceptions::ZuoraAPIError.new("Request URL is too long", response)
928
930
  else
929
931
  raise ZuoraAPI::Exceptions::ZuoraAPIInternalServerError.new(error_message, response)
930
932
  end
@@ -994,7 +996,7 @@ module ZuoraAPI
994
996
  raise ZuoraAPI::Exceptions::ZuoraAPIUnkownError.new(message, response, errors, success)
995
997
  end
996
998
  raise ZuoraAPI::Exceptions::ZuoraAPIError.new(message, response, errors, success)
997
- when /invalid/, /^DUPLICATE_VALUE/, /^REQUEST_REJECTED/, /INVALID_ID/, /MAX_RECORDS_EXCEEDED/, /INVALID_FIELD/, /MALFORMED_QUERY/, /NO_PERMISSION/, /PDF_QUERY_ERROR/, /MISSING_REQUIRED_VALUE/, /INVALID_TYPE/, /TRANSACTION_FAILED/, /API_DISABLED/, /CANNOT_DELETE/, /ACCOUNTING_PERIOD_CLOSED/
999
+ when /^INVALID_VERSION/, /invalid/, /^DUPLICATE_VALUE/, /^REQUEST_REJECTED/, /INVALID_ID/, /MAX_RECORDS_EXCEEDED/, /INVALID_FIELD/, /MALFORMED_QUERY/, /NO_PERMISSION/, /PDF_QUERY_ERROR/, /MISSING_REQUIRED_VALUE/, /INVALID_TYPE/, /TRANSACTION_FAILED/, /API_DISABLED/, /CANNOT_DELETE/, /ACCOUNTING_PERIOD_CLOSED/
998
1000
  raise ZuoraAPI::Exceptions::ZuoraAPIError.new(message, response, errors, success)
999
1001
  when /.*UNEXPECTED_ERROR/
1000
1002
  raise ZuoraAPI::Exceptions::ZuoraUnexpectedError.new(message, response, errors, success)
@@ -1404,7 +1406,7 @@ module ZuoraAPI
1404
1406
  end
1405
1407
  raise
1406
1408
  else
1407
- raise ZuoraAPI::Exceptions::FileDownloadError.new("File Download Failed #{response.class}")
1409
+ raise ZuoraAPI::Exceptions::FileDownloadError.new("File Download Failed #{response.class} - #{response.body}")
1408
1410
  end
1409
1411
  end
1410
1412
 
@@ -1,3 +1,3 @@
1
1
  module ZuoraAPI
2
- VERSION = "1.7.66g"
2
+ VERSION = "1.7.66l"
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.7.66g
4
+ version: 1.7.66l
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: 2020-06-15 00:00:00.000000000 Z
11
+ date: 2020-07-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler