AddFolder response does not correspond with current docs


delegatevoid

Recommended Posts

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.

 

 

Link to comment
Share on other sites

Here are the values for result I've figured out so far (for AddFolder):

 

  • 2
    There are some parameters missing from the request, for example if you forget the secret
  • 100
    The local folder (dir) you specified does not exist or is not accessible
  • 200
    The folder has already been added to BTSync, in this case they are reffering
    to the fact that the used key has already been registered as a synced folder
  • 201
    The secret key you specified has an invalid length
  • 103
    The 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.

Link to comment
Share on other sites

  • 3 weeks later...

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.