Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client.createDocumentAsync error? #41

Closed
IrisClasson opened this issue Apr 24, 2015 · 2 comments
Closed

client.createDocumentAsync error? #41

IrisClasson opened this issue Apr 24, 2015 · 2 comments
Labels

Comments

@IrisClasson
Copy link

I might just be very tired, but I noticed some unexpected behavior I though I would share to check my sanity/lack of sleep.

If I call : client.createDocumentAsync(collection._self, doc); the promise chain is broken and I get an error that automatidIdgeneration can't be read on undefined. I'm not passing in options as you can see.

However, if I call: client.createDocumentAsync(collection._self, doc,{}); it works fine and continues.

The original call, client.createDocument(collection._self, doc, function (err,doc){}); does not return an error with the same params. From the tests in the core SDK I can't see that {disableAutomaticIdGeneration: false} is required.

Anyways, great job- thanks for wrapping up the client neatly. Thumbs up!

@nomiero
Copy link
Contributor

nomiero commented Apr 27, 2015

Hi Iris,

Thanks for reporting the issue. There is a bug now in the promise wrapper that happens with createDocumentAsync without passing options and without having an id property in the document ( I guess that's the case you have and it's the case not covered in tests ).
A fix for this issue will be available with the next release but for now you can continue with the work around you have.

@nomiero nomiero added the bug label Apr 27, 2015
@ghost
Copy link

ghost commented May 15, 2015

closed with release of 1.0.1

@ghost ghost closed this as completed May 15, 2015
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants