Fixes #5 - check for API errors and raise exception if encountered #6

merged 5 commits into from Feb 20, 2017


None yet

2 participants

jantman commented Feb 17, 2017

When using this gem in a new project, I tried to create some graphs with an invalid graph definition... and found that I was getting a key error trying to read the result. It turns out that the methods to mute and unmute monitors, and create timeboards and screenboards, weren't checking for API errors.

I added a new custom exception class for API errors, and these methods now raise that if they get an error response.


Just one question.

@@ -303,7 +320,7 @@ def upsert_monitor(
# Create a monitor that doesn't already exist; return its id
- # @param mon_name [String] mane of the monitor to create
+ # @param _mon_name [String] mane of the monitor to create
jniesen Feb 20, 2017 Member

This documented params doesn't seem to be used anywhere. Was it deprecated at some point?

jantman Feb 20, 2017 Collaborator

Honestly I don't know... all I know is that when I went to build docs, I got a warning for the param name in the docstring not matching the actual param name on the method, so I fixed the docstring...

jniesen commented Feb 20, 2017


@jantman jantman merged commit ebd9f09 into master Feb 20, 2017

1 check passed

ci/circleci Your tests passed on CircleCI!
@jantman jantman deleted the issues/5 branch Feb 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment