docomo_image_recognition 0.1.0 → 0.1.1
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 326144258e2414e641f53dc8c938df0f5a415774
|
4
|
+
data.tar.gz: ff1e7a3bf6f0f2430d3e6dac2ee1278f376dff82
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9299c4eaa413e383a422b135a9362343859ebee6beddbb9ff3f43b5d052a8e716666fa2fe9a9323035fd1afb8c9f96e90cdb19c005a8266824c75bbfe102b09
|
7
|
+
data.tar.gz: 6e8cb40a7086a80ec717338d56556b18275d428892bd37b6fd88fa0678328ed75c735a1ebdc3be6a460277747694c24e2bf35f0ab0e92f406444987b51fca5e4
|
@@ -47,8 +47,8 @@ module DocomoImageRecognition
|
|
47
47
|
def raise_on_error!(body, status)
|
48
48
|
case status.split(' ')[0].to_i
|
49
49
|
when 200 then return
|
50
|
-
when 401 then fail
|
51
|
-
when 400 then fail
|
50
|
+
when 401 then fail ApiError.new(body), 'not authorized'
|
51
|
+
when 400 then fail ApiError.new(body), 'bad request'
|
52
52
|
end
|
53
53
|
end
|
54
54
|
end
|