This project is read-only.

Login failures need more return status

Nov 21, 2011 at 12:45 AM
Edited Nov 21, 2011 at 8: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 -- 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.


Nov 21, 2011 at 10: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.