Login failures need more return status

Nov 20, 2011 at 11:45 PM
Edited Nov 21, 2011 at 7:51 PM

Hi Dima,

In building a new application I ran into an issue when trying to login.  The userInfo object is returned in the callback, but both the Token and Secret properties were null.  By stepping through the Login method of the DropBoxyEngine I found that the response.Content contained the actual error.  In this case it was: "{\"error\": \"You're using an older version of the Dropbox API with a new API key. Please use the latest version.\"}".  I'm going to download the latest version of DropBoxy -- hope it works.

I deleted the app in Dropbox and got this error: "{\"error\": \"This app has been disabled.\"}", which was caused by my deleting the app from Dropbox.com -- my bad!  There is also the StatusCode and StatusDescription properties which said "Forbidden".

I tried the test again on another app, passing an invalid username/password.  The error returned was "{\"error\": \"The provided user information is not valid\"}", with StatusCode/StatusDescription = "Unauthorized".

I think you should return more information rather than just nulls which would allow the developer to determine why the login failed.  Maybe you could expand the UserInfo class to provide a status field, or maybe provide an overridden callback method passing the error string rather than the UserInfo object.

Chuck

Nov 21, 2011 at 9:21 PM

Oops, ignore everything I said!  I just downloaded the latest (13683) change set and see that you already have this built-in -- EXCELLENT!  Great work, keep it up.

Chuck