DOGE Connecting

Docs / Wallet provider / Errors

window.dogesoft

Errors

Every error shape the provider can throw, plus the 60-second request timeout to design around.

The provider keeps its error handling simple on purpose: every failure is a rejected Promise with a plain Error — there's no numeric error-code table to maintain against. Match on the message text, or just surface it to the user; it's already written to be readable.

Common errors

MessageCause
"Doge Soft Wallet not found" Your own feature-detection guard — window.dogesoft is undefined.
DogeSoft: unknown method "…" A request() call used a method string outside the supported set.
DogeSoft: request timeout No response from the wallet within 60 seconds — see below.
User-facing rejection text The user closed or declined the approval prompt (connect, send, or sign).

The 60-second timeout

Every call from your page to the wallet travels over postMessage and is bounded by a 60-second timeout. In the ordinary case — the user reviews and approves a prompt — this never fires. It exists for the case where the wallet can't respond at all (a crashed background context, a stale injected page) so your app doesn't hang forever on a promise that will never resolve.

handle-errors.js
try {
  await dogesoft.sendDoge({ to, amount });
} catch (err) {
  if (err.message === "DogeSoft: request timeout") {
    // wallet didn't respond in time — ask the user to reopen it
  } else {
    // declined, or a validation error — message is already readable
    showToast(err.message);
  }
}
💡

Because messages are plain strings rather than stable error codes, prefer matching on a small known set (like the timeout string above) and otherwise treating any rejection as "show the message and stop" — don't build branching logic against exact wording you haven't seen documented here.