gds-api-adapters 52.0.0 → 52.1.0
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 +4 -4
- data/lib/gds_api/exceptions.rb +8 -3
- data/lib/gds_api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 40085ff1cfbfc2f1b252dae911e46de0b8abedd0ad89baa379a4e9547e37c756
|
|
4
|
+
data.tar.gz: c5b4deb265a8398b9f5c02ac73fb054536c63ef4a5334831040365a6628181f0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: df132d9e73f0456a45086a0774e56272df554714ae25754d4f40a83a51d9ad2eca2b69cf2de37e981c9e87b130ff96267eae1b87584c7388e454e455cca685f8
|
|
7
|
+
data.tar.gz: 29bfdb1f8457561a9f3008be3b6dfaaa320a34d0aa581ee07ab46b6708c7e00ba0ac2d2ff1aced212a03bb4da449301760c6ccf5f0f0155148c054d2653686ae
|
data/lib/gds_api/exceptions.rb
CHANGED
|
@@ -31,6 +31,7 @@ module GdsApi
|
|
|
31
31
|
|
|
32
32
|
# Superclass & fallback for all 4XX errors
|
|
33
33
|
class HTTPClientError < HTTPErrorResponse; end
|
|
34
|
+
class HTTPIntermittentClientError < HTTPClientError; end
|
|
34
35
|
|
|
35
36
|
class HTTPNotFound < HTTPClientError; end
|
|
36
37
|
class HTTPGone < HTTPClientError; end
|
|
@@ -39,14 +40,16 @@ module GdsApi
|
|
|
39
40
|
class HTTPForbidden < HTTPClientError; end
|
|
40
41
|
class HTTPConflict < HTTPClientError; end
|
|
41
42
|
class HTTPUnprocessableEntity < HTTPClientError; end
|
|
43
|
+
class HTTPTooManyRequests < HTTPIntermittentClientError; end
|
|
42
44
|
|
|
43
45
|
# Superclass & fallback for all 5XX errors
|
|
44
46
|
class HTTPServerError < HTTPErrorResponse; end
|
|
47
|
+
class HTTPIntermittentServerError < HTTPServerError; end
|
|
45
48
|
|
|
46
49
|
class HTTPInternalServerError < HTTPServerError; end
|
|
47
|
-
class HTTPBadGateway <
|
|
48
|
-
class HTTPUnavailable <
|
|
49
|
-
class HTTPGatewayTimeout <
|
|
50
|
+
class HTTPBadGateway < HTTPIntermittentServerError; end
|
|
51
|
+
class HTTPUnavailable < HTTPIntermittentServerError; end
|
|
52
|
+
class HTTPGatewayTimeout < HTTPIntermittentServerError; end
|
|
50
53
|
|
|
51
54
|
module ExceptionHandling
|
|
52
55
|
def build_specific_http_error(error, url, details = nil, request_body = nil)
|
|
@@ -71,6 +74,8 @@ module GdsApi
|
|
|
71
74
|
GdsApi::HTTPPayloadTooLarge
|
|
72
75
|
when 422
|
|
73
76
|
GdsApi::HTTPUnprocessableEntity
|
|
77
|
+
when 429
|
|
78
|
+
GdsApi::HTTPTooManyRequests
|
|
74
79
|
when (400..499)
|
|
75
80
|
GdsApi::HTTPClientError
|
|
76
81
|
when 500
|
data/lib/gds_api/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gds-api-adapters
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 52.
|
|
4
|
+
version: 52.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- GOV.UK Dev
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-03-
|
|
11
|
+
date: 2018-03-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: plek
|