zuora_api 1.7.66h → 1.7.66m

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: f249f52bbfd3bc0ab1973ecdfa9bacf5d61d8c115f2c84a662c35df5479ffe88
4
- data.tar.gz: 486c87116df598676c3939b0ef9bb15be136b1d84d5836077ab382476eedfd3a
3
+ metadata.gz: 898385c59ee720160006d5c40ed7853a8493d5c78491a3c907c6eea422d9e873
4
+ data.tar.gz: a69076960b516476aa0f19c0518e20239357d5e0bb4ba83fcb18c2c985935bdd
5
5
  SHA512:
6
- metadata.gz: 85cdae2878399c64bd5bda7bcffb7e18b57651abebcf6d909efaa11d0af253103232c70229db86f5564b18ef24dce3b1f4c3fa56ffa67bd98905e7920352974e
7
- data.tar.gz: b7db4bcfa9cab99ca10f9545ccfeba97a75f555fd64d718ea3d9f267706c9339e2af0f47837d1cecc53c624b901158881d870051b522af2894b12e9afb84b6d9
6
+ metadata.gz: ec6f92a0334033bd1b3fdfabcf4577f50dad9f18d43253abf89db198096b9fec15977922d715949e7075fa2713901d39d4b4da89e25b5374b1495de796423f41
7
+ data.tar.gz: 0217c3d47b9b7ef5f0e7b7785be8b0f0d07f3c62672e8c86181f0d24dd5c0e43c615fee8e27dbebd30d09d11b9505952457ab38ad5cffaa0a7584b8a8002c270
@@ -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)
@@ -1403,6 +1405,14 @@ module ZuoraAPI
1403
1405
  raise ZuoraAPI::Exceptions::ZuoraAPISessionError.new(self.current_error)
1404
1406
  end
1405
1407
  raise
1408
+ when Net::HTTPNotFound
1409
+ if url.include?(self.fileURL)
1410
+ raise ZuoraAPI::Exceptions::FileDownloadError.new(
1411
+ "The current tenant does not have a file with id '#{url.split('/').last}'"
1412
+ )
1413
+ else
1414
+ raise ZuoraAPI::Exceptions::FileDownloadError.new("File Download Failed #{response.class}")
1415
+ end
1406
1416
  else
1407
1417
  raise ZuoraAPI::Exceptions::FileDownloadError.new("File Download Failed #{response.class}")
1408
1418
  end
@@ -1,3 +1,3 @@
1
1
  module ZuoraAPI
2
- VERSION = "1.7.66h"
2
+ VERSION = "1.7.66m"
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.66h
4
+ version: 1.7.66m
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-16 00:00:00.000000000 Z
11
+ date: 2020-08-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler