pager_duty-connection 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -1
- data/lib/pager_duty/connection.rb +2 -2
- data/lib/pager_duty/connection/version.rb +1 -1
- metadata +1 -1
data/README.md
CHANGED
@@ -21,7 +21,7 @@ In the end, this is what it does:
|
|
21
21
|
And this is what it doesn't do:
|
22
22
|
|
23
23
|
* provide first class objects for Incidents, Services, etc (they can change, and have new methods)
|
24
|
-
* provide an a ActiveResource interface (ActiveResource libraries can be hard to
|
24
|
+
* provide an a ActiveResource interface (ActiveResource libraries can be hard to build wrappers for. Also, it's not conducive to accessing multiple pagerduty accounts)
|
25
25
|
* have methods for individual API calls that are possible (ie `find_incident`, `list_users`, etc)
|
26
26
|
* provide [will_paginate](https://github.com/mislav/will_paginate) or [kaminari](https://github.com/amatsuda/kaminari) paginated arrays (They aren't super documented for building a library that works well with them, and have different APIs)
|
27
27
|
|
@@ -33,9 +33,9 @@ module PagerDuty
|
|
33
33
|
url = response.env[:url].to_s
|
34
34
|
if error = response.body['error']
|
35
35
|
# TODO May Need to check error.errors too
|
36
|
-
raise ApiError, "Got HTTP #{response
|
36
|
+
raise ApiError, "Got HTTP #{response['status']} back for #{url}. Error code #{error['code']}: #{error['message']}"
|
37
37
|
else
|
38
|
-
raise ApiError, "Got HTTP #{response
|
38
|
+
raise ApiError, "Got HTTP #{response['status']} back for #{url}."
|
39
39
|
end
|
40
40
|
else
|
41
41
|
response
|