chikka 0.1.9 → 0.2.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/chikka.rb +5 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c35bd1d1b82cd4076c5a5ffae2a1d2c8b342388
|
4
|
+
data.tar.gz: 87b88a1486a627acb0d403b7643feae27b37fedb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 62726d3d297913c24370cfed172f0960ca344940658a5fda60e88a75b5edd1fdfedd551723a8a594034b605ce76ea627c9213baa4ebcadc61763cdb8fb4eaebc
|
7
|
+
data.tar.gz: a88f9ae000d25ffdd922585f68b62a01bb4ef64d846025268f8b239bd761a266c47ca52e0b28dda8526a5ec1a0adde111d024ec0bfad1d49ae6478779ef732a5
|
data/lib/chikka.rb
CHANGED
@@ -6,7 +6,7 @@ module Chikka
|
|
6
6
|
|
7
7
|
class Error < StandardError; end
|
8
8
|
|
9
|
-
class
|
9
|
+
class BadRequestError < Error; end
|
10
10
|
|
11
11
|
class AuthenticationError < Error; end
|
12
12
|
|
@@ -72,9 +72,11 @@ module Chikka
|
|
72
72
|
when 200
|
73
73
|
response_obj
|
74
74
|
when 401
|
75
|
-
raise AuthenticationError.new(message=
|
75
|
+
raise AuthenticationError.new(message=response_obj.description)
|
76
|
+
when 400
|
77
|
+
raise BadRequestError.new(message = response_obj.description)
|
76
78
|
else
|
77
|
-
raise Error.new(message=
|
79
|
+
raise Error.new(message=response_obj.description)
|
78
80
|
end
|
79
81
|
end
|
80
82
|
end
|