update errors list

This commit is contained in:
Paul Miller
2023-11-08 17:03:47 -06:00
parent 56a8c06b62
commit dd12f55fae

View File

@@ -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 {