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

Update README with details of error handling #8

Open
mkdynamic opened this issue Nov 25, 2015 · 2 comments
Open

Update README with details of error handling #8

mkdynamic opened this issue Nov 25, 2015 · 2 comments

Comments

@mkdynamic
Copy link
Contributor

No description provided.

@andreimarinescu
Copy link

Hey guys. This issue is almost 3 years old at this point. Could you please clarify if the promises returned by the Delighted API calls also have a catch callback? I'd like to use the async/await syntax and it's not clear whether try/catch(error) would get triggered correctly, based on the examples provided in the README.md.

Thanks!

@mkdynamic
Copy link
Contributor Author

@andreimarinescu The library does not currently provide catch callbacks:

$ node
> var delighted = require('delighted')('KEY')
undefined
> delighted.person.create({}).then(function() { console.log('ok') }, function() { console.log('fail') })
{ then: [Function: bound then] }
> fail
> delighted.person.create({}).then(function() { console.log('ok') }).catch(function() { console.log('catch') })
TypeError: delighted.person.create(...).then(...).catch is not a function

It's on the roadmap to add this but no ETA currently I'm afraid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants