jdolitsky / AppDotNetPHP

PHP library for the App.net Stream API
34 stars 19 forks source link

Error handling in getAccessToken() #49

Open simonwelsh opened 10 years ago

simonwelsh commented 10 years ago

Currently, getAccessToken() assumes that the call to access_token always returns a valid token. However, if the code has expired, has been used before, is incorrect or in a range of other cases, an error is returned instead.

simonwelsh commented 10 years ago

So, I was wrong. It does already throw an AppDotNetException. However, it contains the entire response now just the error message (HTTP code's 400).