@kepas/daraja-js
    Preparing search index...

    Function errorFromResult

    • Build the most specific error for a Daraja async result, enriched from the proven code catalog. The thrown message is the catalog's authored, actionable text WHEN the code is proven for this scope; otherwise it is Safaricom's verbatim resultDesc. resultCode/resultDesc/raw are never altered. scope defaults to 'stk' for backward compatibility.

      Parameters

      Returns DarajaAPIError