Skip to content
This repository was archived by the owner on Oct 7, 2024. It is now read-only.

Always return rejected Promise upon failure#85

Merged
Gudahtt merged 1 commit intomainfrom
use-async-for-all-async-methods
Jul 12, 2021
Merged

Always return rejected Promise upon failure#85
Gudahtt merged 1 commit intomainfrom
use-async-for-all-async-methods

Conversation

@Gudahtt
Copy link
Copy Markdown
Member

@Gudahtt Gudahtt commented Jul 8, 2021

All methods that return Promises now use the async keyword. This simplifies the methods and ensures a consistent return value in the case of an error.

For example, the method getAppKeyAddress would sometimes reject if it encountered an error, and sometimes it would throw an error. Now it will always reject, which is what you would typically expect of an asynchronous function.

@Gudahtt Gudahtt requested a review from a team as a code owner July 8, 2021 23:10
@Gudahtt Gudahtt force-pushed the use-async-for-all-async-methods branch from f0ab248 to e1e6e2c Compare July 9, 2021 01:22
shanejonas
shanejonas previously approved these changes Jul 12, 2021
All methods that return Promises now use the `async` keyword. This
simplifies the methods and ensures a consistent return value in the
case of an error.

For example, the method `getAppKeyAddress` would sometimes reject if it
encountered an error, and sometimes it would throw an error. Now it
will always reject, which is what you would typically expect of an
asynchronous function.
@Gudahtt Gudahtt force-pushed the use-async-for-all-async-methods branch from e1e6e2c to 3b1764c Compare July 12, 2021 18:46
@Gudahtt
Copy link
Copy Markdown
Member Author

Gudahtt commented Jul 12, 2021

Just rebased this to resolve the conflicts

@Gudahtt Gudahtt merged commit f23e92f into main Jul 12, 2021
@Gudahtt Gudahtt deleted the use-async-for-all-async-methods branch July 12, 2021 19:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants