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

Already on GitHub? Sign in to your account

Mo better errors #92

Open
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants

Expand on Pull #89 "Provide more descriptive exception messages" (djanowski).

#89

Move @code and @desription in a separate set_response_code method so it can be overriden by subclass. As other OAuth2 providers may use non-standard key names for errors.

An example for a subclass of OAuth2::Error that needs to change the error @code/@description setters.

Old:
https://github.com/acenqiu/weibo2/blob/master/lib/weibo2/error.rb

New:
https://github.com/goofrider/weibo2/blob/master/lib/weibo2/error.rb

+1 from me!!

This really should have been merged a long time ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment