mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
💡 Add comment about intentional error propagation
This commit is contained in:
parent
9c1e6f3b27
commit
35716db65a
1 changed files with 2 additions and 0 deletions
|
@ -194,6 +194,8 @@ export const useBusyState = () => {
|
|||
const withActivity = useCallback(
|
||||
async ( id, description, asyncFn ) => {
|
||||
startActivity( id, description );
|
||||
|
||||
// Intentionally does not catch errors but propagates them to the calling module.
|
||||
try {
|
||||
return await asyncFn();
|
||||
} finally {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue