delegatevoid Posted November 16, 2013 Report Share Posted November 16, 2013 According to the documentation the response to an add_folder request is{ "error": 0 }Which is true when there is no error,however if, for example you specify an invalid key the response is:{ "message": "This secret is invalid.\nPlease generate a new secret or enter your shared folder secret.", "result": 201 }I think result should be error?It would also be good if we actually had a list of the errors that we can expect from the api. Quote Link to comment Share on other sites More sharing options...
voz Posted November 16, 2013 Report Share Posted November 16, 2013 +1 for the list of errors. This is important to make proper error handling in our libraries. Quote Link to comment Share on other sites More sharing options...
delegatevoid Posted November 17, 2013 Author Report Share Posted November 17, 2013 Here are the values for result I've figured out so far (for AddFolder): 2There are some parameters missing from the request, for example if you forget the secret100The local folder (dir) you specified does not exist or is not accessible200The folder has already been added to BTSync, in this case they are refferingto the fact that the used key has already been registered as a synced folder201The secret key you specified has an invalid length103The specified folder is not a btsync folder As I continue implementing I'm sure I'll find more, would be great though if the devs just published this info. Quote Link to comment Share on other sites More sharing options...
zechdc Posted December 3, 2013 Report Share Posted December 3, 2013 (edited) Please delete this post Edited December 3, 2013 by zechdc Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.