chargebee 2.11.1 → 2.11.2

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: e664476f0031637f5dc53d9d0222d6b3200302412d09e0f538c52b566c290bcc
4
- data.tar.gz: e6f0dc23f445dc4adba98662b23590b3a957918ec3f0e8d274c750b2fab4a985
3
+ metadata.gz: 0161fb2d18ed430ea6daacbff4d15094aa5a277c99dc7fe26c1e97d6b2090e38
4
+ data.tar.gz: 52b81f2222f0ab37e676468f1df9b317c8dfa78add2a92a5fdde1e53634b48b3
5
5
  SHA512:
6
- metadata.gz: 6771250ed0a73f48d33fc4056cec1e5fa58a4222a7606e40a3ec484519a33e00caaede36b9cdd93a3c9918ca7107a054709cda4b12b8616c7812f5b43cb47868
7
- data.tar.gz: 49d50cef08a046ecce8493de915fe1ba93e66a5b84b79cc8d8904dcb5e05d0e33018288393c9b55cf22954b504bd5e6a721e377aab622ffea821975a599400d7
6
+ metadata.gz: 60d4112a05bef4c902e4e64b93ce50c30637922dfc00c32f92af996e7c349e02ec2ce55fc10198cd6a595545627a68ef6229ab0d490223c16a79f2667fbaee96
7
+ data.tar.gz: ad7310dbc8448c6be60bb36c6054e3d753d3cfe96fd7a79762806b6a85dcba5f4580c4ed2c3322bed84ea1d8e531dea83d023a35077c1f0eee998e570415bc38
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ### v2.11.2 (2021-01-05)
2
+ * * *
3
+
4
+ ### Fixes:
5
+ * Improved error message for Invalid JSON response.
6
+
1
7
  ### v2.11.1 (2021-12-22)
2
8
  * * *
3
9
 
data/chargebee.gemspec CHANGED
@@ -4,8 +4,8 @@ Gem::Specification.new do |s|
4
4
  s.rubygems_version = '1.3.5'
5
5
  s.required_ruby_version = '>= 1.9.3'
6
6
  s.name = 'chargebee'
7
- s.version = '2.11.1'
8
- s.date = '2021-12-22'
7
+ s.version = '2.11.2'
8
+ s.date = '2022-01-05'
9
9
  s.summary = "Ruby client for Chargebee API."
10
10
  s.description = "Subscription Billing - Simple. Secure. Affordable. More details at www.chargebee.com."
11
11
 
@@ -59,7 +59,13 @@ module ChargeBee
59
59
  begin
60
60
  resp = JSON.parse(rbody)
61
61
  rescue Exception => e
62
- raise Error.new("Response not in JSON format. Probably not a ChargeBee response \n #{rbody.inspect}",e)
62
+ if rbody.include? "503"
63
+ raise Error.new("Sorry, the server is currently unable to handle the request due to a temporary overload or scheduled maintenance. Please retry after sometime. \n type: internal_temporary_error, \n http_status_code: 503, \n error_code: internal_temporary_error,\n content: #{rbody.inspect}",e)
64
+ elsif rbody.include? "504"
65
+ raise Error.new("The server did not receive a timely response from an upstream server, request aborted. If this problem persists, contact us at support@chargebee.com. \n type: gateway_timeout, \n http_status_code: 504, \n error_code: gateway_timeout,\n content: #{rbody.inspect}",e)
66
+ else
67
+ raise Error.new("Sorry, something went wrong when trying to process the request. If this problem persists, contact us at support@chargebee.com. \n type: internal_error, \n http_status_code: 500, \n error_code: internal_error,\n content: #{rbody.inspect}",e)
68
+ end
63
69
  end
64
70
  resp = Util.symbolize_keys(resp)
65
71
  resp
data/lib/chargebee.rb CHANGED
@@ -53,7 +53,7 @@ require File.dirname(__FILE__) + '/chargebee/models/usage.rb'
53
53
 
54
54
  module ChargeBee
55
55
 
56
- VERSION = '2.11.1'
56
+ VERSION = '2.11.2'
57
57
 
58
58
  @@default_env = nil
59
59
  @@verify_ca_certs = true
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chargebee
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.11.1
4
+ version: 2.11.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rajaraman S
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-12-22 00:00:00.000000000 Z
12
+ date: 2022-01-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json_pure