Closed monkbroc closed 8 years ago
Try again?
hook.datastore.get(), set(), del(), exists(), recent()
used to return a Promise https://github.com/bigcompany/hook.io-datastore/pull/1
It appears that it no longer does, breaking code that relied on the Promise API of hook.datastore
Can you try again?
It's a different error now. No longer a function call error on then()
but this.
{"error":true,"message":"\"anonymous\" does not have the role \"datastore::get\" which is required to access \"/datastore/get\"\n\nIf you are the owner of this resource try logging in at https://hook.io/login\n\nIf any access keys have been created you can also provide a `hook_private_key` parameter to access the service.","user":"anonymous","role":"datastore::get","type":"unauthorized-role-access"}
Try one more time. We had some issues migrating legacy users.
Thanks. It is working again now. That's an strange manifestation of a migration issue, but thanks for resolving it quickly!
Is quite simple.
First, https://github.com/bigcompany/hook.io-sdk/blob/master/index.js#L63 was not set in chroot jail. So that is one line change.
Second, your user document was cached and missing new internal API access key. I cleared cache and your new internal api access key is now bound to your user scope.
Sorry for the issues!
This code no longer works because
hook.datastore.get()
doesn't return a Promise anymore.