kartit / restfb

Automatically exported from code.google.com/p/restfb
0 stars 0 forks source link

FacebookOAuthException explicit HTTP status code #188

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. Make a call to facebook using the API, eg. POST a message call.
2. The credentials (token) should be invalid.
3. We receive back an exception of type OAuthException but not an explicit 
status code, eg. 4xx.

There is appears to be no way to differentiate between various OAuthException 
situations. The same type of Exception is thrown if:
  1. The credentials are invalid
  2. The credentials are malformed
  3. The status update is duplicate  
  4. etc

So I cannot inform my users for the specific error of the POST, just that it 
was an OAuthException.

Perhaps an enhancement should be made so that HTTP status code is included as 
well. 

Please provide any additional information below.

Original issue reported on code.google.com by mtsaha...@gmail.com on 7 May 2012 at 1:02

GoogleCodeExporter commented 8 years ago
I think this is a good idea, thanks.  Will add it.

Original comment by m...@xmog.com on 7 May 2012 at 1:10

GoogleCodeExporter commented 8 years ago
Thank you for the very quick reply.

Please, remember to update this post when you manage to add HTTP status code in 
FacebookOAuthException so as to pick up your latest implementation and deploy 
it in my project.

Kind Regards,
Manos

Original comment by mtsaha...@gmail.com on 7 May 2012 at 2:07

GoogleCodeExporter commented 8 years ago
Fixed in 
https://github.com/revetkn/restfb/commit/5dfe75bde7d69f50bb998682e738157d864c3de
1

Original comment by m...@xmog.com on 3 Sep 2012 at 12:51