gds-api-adapters 52.0.0 → 52.1.0

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: 19ed109b9307872018dd4d51de2c82b59bc10bbb0ac0d7740d7f8ff7bc5fc2e8
4
- data.tar.gz: a8f7fc6a5116e526990a04ef4988ae7012cfc35f792d15f7c38e6a26a034e374
3
+ metadata.gz: 40085ff1cfbfc2f1b252dae911e46de0b8abedd0ad89baa379a4e9547e37c756
4
+ data.tar.gz: c5b4deb265a8398b9f5c02ac73fb054536c63ef4a5334831040365a6628181f0
5
5
  SHA512:
6
- metadata.gz: 79e442283d5043564c13abb4c233ed1a6fc0792a5853ec0e765ae151aff5643a702c801c4a0e3492bf15d81cdc8d4ba533c50143f867eb82569012c832850fb6
7
- data.tar.gz: 2100491e55bb8f6a618562cce252ced527a16e1155755ebcc72256fc30f474b82d8a0745e53efc5b47c97ec74cb85fb77a04d402b7e034ba6bc62a11ca306461
6
+ metadata.gz: df132d9e73f0456a45086a0774e56272df554714ae25754d4f40a83a51d9ad2eca2b69cf2de37e981c9e87b130ff96267eae1b87584c7388e454e455cca685f8
7
+ data.tar.gz: 29bfdb1f8457561a9f3008be3b6dfaaa320a34d0aa581ee07ab46b6708c7e00ba0ac2d2ff1aced212a03bb4da449301760c6ccf5f0f0155148c054d2653686ae
@@ -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 < HTTPServerError; end
48
- class HTTPUnavailable < HTTPServerError; end
49
- class HTTPGatewayTimeout < HTTPServerError; end
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
@@ -1,3 +1,3 @@
1
1
  module GdsApi
2
- VERSION = '52.0.0'.freeze
2
+ VERSION = '52.1.0'.freeze
3
3
  end
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.0.0
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-09 00:00:00.000000000 Z
11
+ date: 2018-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: plek