Skip to content

Callback promises migration #162

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

Merged
merged 35 commits into from
Nov 15, 2022
Merged

Conversation

ashah-splunk
Copy link
Contributor

  • Callbacks have been removed and instead we are returning Promises which enables users to use Async/Await features of JS.
  • Refactored tests cases and SDK lib files with latest JS features.
  • added 'response_timeout' parameter which enables user to specify the timeout for a particular API call.
  • Removed Async.js file and the required methods have been migrated to Utils.js following the Promise structure.

@ashah-splunk ashah-splunk requested a review from vupadhyay August 9, 2022 15:35
return [new Error("Didn't get a Pivot report back from Splunk"), response];
}
}).catch((err) => {
// TODO: analyze use of response argument and change accordingly
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't worry about this too much, this would be a new scenario that we weren't handling previously - omitting the response seems perfectly fine to me

@akaila-splunk akaila-splunk changed the title WIP: Callback promises migration Callback promises migration Nov 8, 2022
Copy link
Contributor

@fantavlik fantavlik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking great, thanks for addressing all of those comments 🚀

@akaila-splunk akaila-splunk merged commit 1fdb749 into develop Nov 15, 2022
@akaila-splunk akaila-splunk mentioned this pull request Jan 27, 2023
@ashah-splunk ashah-splunk deleted the callback-promises-migration branch April 20, 2023 11:56
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

Successfully merging this pull request may close these issues.

4 participants