From dd12f55faee6835a8023b3390af13cb24ce9ebe8 Mon Sep 17 00:00:00 2001 From: Paul Miller Date: Wed, 8 Nov 2023 17:03:47 -0600 Subject: [PATCH] update errors list --- src/logic/errorDispatch.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/logic/errorDispatch.ts b/src/logic/errorDispatch.ts index c6f0820..7c86ea5 100644 --- a/src/logic/errorDispatch.ts +++ b/src/logic/errorDispatch.ts @@ -1,10 +1,12 @@ // IMPORTANT: this should match 1:1 with the MutinyJsError enum in mutiny-wasm // If we can handle all of these, we can handle all the errors that Mutiny can throw -// WARNING: autogenerated code, generated by errorsToTs.cjs +// WARNING: autogenerated code, generated by calling: +// `node scripts/errorsToTs.cjs /path/to/mutiny-wasm/src/error.rs` type MutinyError = | "Mutiny is already running." | "Mutiny is not running." + | "Incorrect expected network." | "Resource Not found." | "Funding transaction could not be created." | "Network connection closed." @@ -18,6 +20,7 @@ type MutinyError = | "Failed to call on the given LNURL." | "Failed to make a request to the LSP." | "Failed to request channel from LSP due to funding error." + | "Failed to request channel from LSP due to amount being too high." | "Failed to have a connection to the LSP node." | "Subscription Client Not Configured" | "Invalid Parameter" @@ -38,12 +41,14 @@ type MutinyError = | "Failed to execute a rapid gossip sync function" | "Failed to read or write json from the front end" | "The given node pubkey is invalid." + | "Failed to get nostr data." | "Failed to get the bitcoin price." | "Satoshi amount is invalid" | "Failed to execute a dlc function" | "Failed to execute a wasm_bindgen function" | "Invalid Arguments were given" | "Incorrect password entered." + | "Cannot change password to the same password." | "Unknown Error"; export function matchError(e: unknown): Error {