Skip to content
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

Fix HTTPException to not be thrown on every Facebook error #92

Merged
merged 1 commit into from
Nov 21, 2011
Merged

Fix HTTPException to not be thrown on every Facebook error #92

merged 1 commit into from
Nov 21, 2011

Conversation

s1kx
Copy link

@s1kx s1kx commented Nov 20, 2011

When a Facebook occurs on Graph API calls, the server replies with a 403 HTTP error code. Thus mogli would always throw a HTTPException without any further information on it (thrown by raise_error_if_necessary).
By first checking the response body for an error message and type, we make sure that we get proper exceptions in all cases.

mmangino added a commit that referenced this pull request Nov 21, 2011
Fix HTTPException to not be thrown on every Facebook error
@mmangino mmangino merged commit 4795a4e into mmangino:master Nov 21, 2011
derwiki pushed a commit to causes/mogli that referenced this pull request Apr 16, 2012
Conflicts:
	mogli.gemspec

origin/master was the HEAD of master before this merge happened.

  *   703f1dd (HEAD, master) Merge remote-tracking branch 'upstream/master'
  |\
  | *   cf14773 (upstream/master) Merge pull request mmangino#108 from jonasfa/master
  | |\
  | | * b241486 Adding the 'installed' field to User
  | |/
  | *   9c11855 Merge branch 'master' of github.com:mmangino/mogli
  | |\
  | | *   86dde11 Merge pull request mmangino#106 from shwing/master
  | | |\
  | | | * 4101888 daily_active_users to application, likes to photos
  | | |/
  | | *   cd9fc21 Merge pull request mmangino#104 from ckbhodge/patch-1
  | | |\
  | | | * b8aa965 added property for 'interested_in' which should be valid:
  https://developers.facebook.com/docs/reference/api/user/
  | | |/
  | | *   79bb3fc Merge pull request mmangino#101 from adahmash/master
  | | |\
  | | | * 90d2a14 Added Events assocation to mogli user
  | | | * 9b812aa Upgraded hashtie version for dependency
  | | |/
  | | *   46d0c32 Merge pull request mmangino#98 from lecky/master
  | | |\
  | | | * 14cd054 add subscription model
  | | |/
  | * | bccb36b Gemspec change
  | * | 3a0c5aa Just deleted the get_and_map method which causes an
  OAuthException when using create_and_authenticate_as_application for an
  AppRequest. Travis needs to implement it differently for his TestUser class.
  | |/
  | *   fa7b72d Merge pull request mmangino#96 from intinig/master
  | |\
  | | * 04f74c7 adding application
  | | * 1a428a6 user likes
  | | * 39646ed Revert "Revert "adding missing fields to comments""
  | | * a776856 Revert "adding missing fields to comments"
  | | * 12cf200 adding missing fields to comments
  | | * f7931c4 adding comments and likes to statuses
  | |/
  | *   d55c3b5 Merge pull request mmangino#93 from herval/master
  | |\
  | | * 7da769c friends likes perm
  | | * 4032aa0 publish_actions
  | * |   1ab9b78 Merge pull request mmangino#77 from tadruj/patch-1
  | |\ \
  | | * | e29fd7a removed .parsed_response
  | * | |   4795a4e Merge pull request mmangino#92 from s1kx/master
  | |\ \ \
  | | * | | 833fbd3 Check Facebook error first before throwing a HTTPException
  | |/ / /
  | * | |   8936d63 Merge branch 'master' of github.com:mmangino/mogli
  | |\ \ \
  | | * \ \   4391368 Merge pull request mmangino#89 from jfeng/raise_oauth_error
  | | |\ \ \
  | | | |_|/
  | | |/| |
  | | | * | 70e9114 enable SessionInvalidatedDueToPasswordChange raised
  | | |/ /
  | * | | 2989e21 Clean up profile image code
  | * | |   5f8bc41 Merge branch 'master' of github.com:mmangino/mogli
  | |\ \ \
  | | |/ /
  | | * |   a42bcec Merge pull request mmangino#86 from stupied4ever/patch-1
  | | |\ \
  | | | * | 0a55d20 Update lib/mogli/profile.rb
  | | |/ /
  | * | |   c71b52d Merge branch 'master' of github.com:mmangino/mogli
  | |\ \ \
  | | |/ /
  | | * |   91c726c Merge pull request mmangino#85 from taweili/master
  | | |\ \
  | | | * | 48e80b6 use HTTMultiParty to support file upload
  | | |/ /
  | * | | c7ac4e1 Add info to readme for creating photos
  | * | | b58af15 merge
  | * | | 1db5371 Bump version
  * | | | 69f6682 (origin/master, origin/HEAD) Store total counts on
  * FetchingArray when fb returns a "count" attribute
  * | | |   f7c5a5c Merge remote-tracking branch 'spidaman/master'
  |\ \ \ \
  | * | | | 6f4f08c (origin/sandbox/richard/mogli) added support for querying
  permissions and support for understanding batch query responses
  | * | | | 6c922f2 bumped version to 0.3.5
  | * | | | 5d3247f added friendlists support
  | * | | | bc2c750 added the rsvp_status attribute to events
  | * | | | b2f6d85 added Place model
  | | |/ /
  | |/| |
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

Successfully merging this pull request may close these issues.

2 participants