checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
---
2
- SHA1:
3
- metadata.gz: f371122afffd1a7ee2001eb53f0d6232911bc8c1
4
- data.tar.gz: 277ccd9722b6dbc092190eedc7e5ebe8c9cf8682
2
+ SHA256:
3
+ metadata.gz: f304a44d0c7d7231a3f5ef101e1005652bc9cd801d7263b6dc70138a52229c56
4
+ data.tar.gz: 2a4544537ec874555c7e1aba96f0ebf2457a1bb34af0f3da651e86b9e38fdbff
5
5
SHA512:
6
- metadata.gz: e34002b773b0849e92f427163881c49177e80c85600bb58000b61c3c272276b9401c055df28e3752404b408c9ebac825351b1c7c543a19c3c57e746d775af7d6
7
- data.tar.gz: 50072c5952f184b6966cdc0ef34ce72b15eb7fc5360ac1d96d9475425412321552417759a400f21a3c25fdaff37813ada759c874487134013f324ae4f604d66f
6
+ metadata.gz: 4b02f2de3f7192ad90a5beb5b491be6fa05923f6c12c5b6c6f1a040f8a857013cd7201cfe3cfd50e7088a4b664976d3b87ecb9e33a567f79c4d95847e1885b8f
7
+ data.tar.gz: 346a13001298cb240678ecbe151844181c7504d97263e16e6e118d9509d3962978bee1556a346d76c265b034189afbc8030c35b8c7885ac7f5c52c1902b3d415
data/lib/qbo_api/error.rb CHANGED
@@ -6,6 +6,7 @@
6
6
#404 Not Found The resource is not found.
7
7
#429 Too Many Requests API Throttling/ Rate limiting
8
8
#500 Internal Server Error An error occurred on the server while processing the request. Resubmit request once; if it persists, contact developer support.
9
+ #502 Bad Gateway The server, while acting as a gateway or proxy, received an invalid response from an inbound server it accessed while attempting to fulfill the request.
9
10
#503 Service Unavailable The service is temporarily unavailable.
10
11
# Custom error class for rescuing from all QuickBooks Online errors
11
12
class QboApi
@@ -40,6 +41,9 @@ class QboApi
40
41
# Raised when QuickBooks Online returns the HTTP status code 500
41
42
class InternalServerError < Error; end
42
43
44
+ # Raised when QuickBooks Online returns the HTTP status code 502
45
+ class BadGateway < Error; end
46
+
43
47
# Raised when QuickBooks Online returns the HTTP status code 503
44
48
class ServiceUnavailable < Error; end
45
49
end
data/lib/qbo_api/raise_http_exception.rb CHANGED
@@ -21,6 +21,8 @@ module FaradayMiddleware
21
21
raise QboApi::TooManyRequests.new(error_message(response))
22
22
when 500
23
23
raise QboApi::InternalServerError.new(error_message(response))
24
+ when 502
25
+ raise QboApi::BadGateway.new({ error_body: response.reason_phrase })
24
26
when 503
25
27
raise QboApi::ServiceUnavailable.new(error_message(response))
26
28
end
data/lib/qbo_api/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
class QboApi
2
- VERSION = "1.8.4"
2
+ VERSION = "1.8.5"
3
3
end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
--- !ruby/object:Gem::Specification
2
2
name: qbo_api
3
3
version: !ruby/object:Gem::Version
4
- version: 1.8.4
4
+ version: 1.8.5
5
5
platform: ruby
6
6
authors:
7
7
- Christian Pelczarski
8
8
autorequire:
9
9
bindir: exe
10
10
cert_chain: []
11
- date: 2018-10-26 00:00:00.000000000 Z
11
+ date: 2019-08-13 00:00:00.000000000 Z
12
12
dependencies:
13
13
- !ruby/object:Gem::Dependency
14
14
name: bundler
@@ -236,8 +236,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
236
236
- !ruby/object:Gem::Version
237
237
version: '0'
238
238
requirements: []
239
- rubyforge_project:
239
+ rubygems_version: 3.0.4
240
- rubygems_version: 2.4.5.2
241
240
signing_key:
242
241
specification_version: 4
243
242
summary: Ruby JSON-only client for QuickBooks Online API v3. Built on top of the Faraday