Skip to content

Improve error handling in Pooler and Auth classes #33

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
4 tasks done
briancain opened this issue Sep 24, 2016 · 4 comments
Closed
4 tasks done

Improve error handling in Pooler and Auth classes #33

briancain opened this issue Sep 24, 2016 · 4 comments

Comments

@briancain
Copy link
Contributor

briancain commented Sep 24, 2016

  • Add more errors to error class to be raised
  • Update Auth class to raise errors instead of just returning nil if something goes wrong
  • Update Pooler class to raise more errors when responses are not ok
  • Handle raised errors in command class
@briancain
Copy link
Contributor Author

@johnmccabe sorry to make some additional changes on you...but I'm planning on making the Pooler and Auth class raise error specific messages when things go wrong instead of just returning nil. This should hopefully make things a lot easier to handle as a consumer when something goes wrong.

@briancain
Copy link
Contributor Author

An example of what that's going to look like will be here: 05e9d5a

And then consumers of those classes can use the rescue methods in ruby for all the various vmfloaty/errors that I'll add.

briancain added a commit that referenced this issue Sep 24, 2016
This commit updates the Auth class to properly raise an error when
something goes wrong. It also updates the vmpooler command class to
handle when those errors get raised.
@johnmccabe
Copy link

Sounds good, I'll add handling later this evening.

@briancain
Copy link
Contributor Author

@johnmccabe - I'll let you know when the gem is released, probably later today :)

briancain added a commit that referenced this issue Sep 24, 2016
This commit adds more handling to the vmfloaty command class that deals
with exceptions thrown from the Pooler class.
johnmccabe pushed a commit to johnmccabe/vmpooler-bitbar that referenced this issue Sep 25, 2016
This commit updates the auth token error handling following the updates
to vmfloaty made in puppetlabs/vmfloaty#33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants