Skip to content

Does not work with async await #25

@jazzyarchitects

Description

@jazzyarchitects

I have a file a.js:

TransactionRoutingLayer.handleDebit = async (detail, options) => {
    const { items, userId, referenceNumber } = details;
    const chargeableItem = await ChargeableItem.getMappingIds(items, options);
    return PendingDebit.createPendingDebitEntry({
          amount: chargeableItem.amount,
          userId,
          referenceNumber,
          displayReason: details.displayReason,
          chargeableItemId: chargeableItem.id,
        });
    );
  };

and b.js:

PendingDebit.createPendingDebitEntry = async (details, options) => {
    const cleanedDebitDetails = {
      amount: details.amount,
    };
    Globals.generateTrace({ details, options });
    return PendingDebit.create(cleanedDebitDetails, options);
  };

I get the stack trace only till the last await statement. In this case only till a.js return PendingDebit.createPendingDebitEntry. line only. I don't get stack trace of which function called TransactionRoutingLayer.handleDebit

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions