Make the unknown submitAndWait error more verbose (#2056)

* Make the unknown submitAndWait error more verbose
This commit is contained in:
Jackson Mills
2022-07-26 13:07:02 -07:00
committed by GitHub
parent 295725361c
commit 6187571334
2 changed files with 6 additions and 1 deletions

View File

@@ -6,6 +6,7 @@ Subscribe to [the **xrpl-announce** mailing list](https://groups.google.com/g/xr
### Fixed
* `Wallet.fromMnemonic` now allows lowercase for RFC1751 mnemonics (#2046)
* `Wallet.fromMnemonic` detects when an invalid encoding is provided, and throws an error
* Made unexpected errors in `submitAndWait` more verbose to make them easier to debug.
## 2.3.1 (2022-06-27)
### Fixed

View File

@@ -157,7 +157,11 @@ async function waitForFinalTransactionOutcome(
submissionResult,
)
}
throw new Error(`${message} \n Preliminary result: ${submissionResult}.`)
throw new Error(
`${message} \n Preliminary result: ${submissionResult}.\nFull error details: ${String(
error,
)}`,
)
})
if (txResponse.result.validated) {