Errors
txKit errors include a link to the relevant documentation page with details on the cause and how to fix it.
Error Classes
| Error | Description |
|---|---|
| InvalidConfigError | Invalid TxKitProvider configuration |
| ProviderNotFoundError | TxKitProvider not found in component tree |
| MissingWagmiProviderError | No WagmiProvider found when using embedded mode |
| NestedProviderError | Standalone TxKitProvider nested inside another |
Base Class
All txKit errors extend TxKitError, which provides:
shortMessage- brief description of the errordocsPath- path to the documentation pagedetails- additional context (optional)
import { TxKitError } from '@txkit/core'
try {
// ...
} catch (error) {
if (error instanceof TxKitError) {
console.log(error.shortMessage)
console.log(error.docsPath)
}
}