bbc_redux 0.4.6.pre → 0.4.7.pre
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/bbc/redux/client.rb +5 -0
- data/lib/bbc/redux/version.rb +1 -1
- metadata +2 -2
data/lib/bbc/redux/client.rb
CHANGED
@@ -48,6 +48,9 @@ module BBC
|
|
48
48
|
# Raised when backend HTTP API returns a body that does not parse as json
|
49
49
|
class JsonParseException < Exception; end
|
50
50
|
|
51
|
+
# Raised when backend HTTP API returns a 404
|
52
|
+
class NotFoundException < Exception; end
|
53
|
+
|
51
54
|
# @!attribute [r] http
|
52
55
|
# @return [Object] http client, by default this is Typhoeus
|
53
56
|
attr_reader :http
|
@@ -329,6 +332,8 @@ module BBC
|
|
329
332
|
JSON.parse(resp.body)
|
330
333
|
when 403
|
331
334
|
raise ForbiddenException.new("403 response for #{url}")
|
335
|
+
when 404
|
336
|
+
raise NotFoundException.new("404 response for #{url}")
|
332
337
|
when 400..599
|
333
338
|
raise HttpException.new("#{resp.code} response for #{url}")
|
334
339
|
else
|
data/lib/bbc/redux/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bbc_redux
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.7.pre
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -200,7 +200,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
200
200
|
version: '0'
|
201
201
|
segments:
|
202
202
|
- 0
|
203
|
-
hash:
|
203
|
+
hash: 1837997505390490635
|
204
204
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
205
205
|
none: false
|
206
206
|
requirements:
|