Errors and versioning
Bridge error codes, the API version lifecycle, the deprecation policy, and what happens when a manifest is too old or too new.
Error codes
Every failed bridge call rejects with an Error carrying a code:
| Code | When |
|---|---|
PERMISSION_DENIED | the method or resource is not granted by the widget's manifest (or, for dd.widgets, the target is not user-approved) |
INVALID_PARAMS | params failed host-side validation |
NOT_FOUND | the referenced entity (a key, an item id, a saved network) does not exist; for ids, re-list and retry |
PAYLOAD_TOO_LARGE | a request or response exceeds its documented cap |
TIMEOUT | the operation timed out (host-side, or the SDK's own 15 second client timer) |
RATE_LIMITED | a per-instance rate limit was exceeded; back off |
GONE | the method existed in an older API and was removed. Permanent; the message names the replacement |
INTERNAL | an unexpected host error; details go to the host log |
Handle errors like any other rejected promise, and degrade instead of crashing:
try {
await dd.media.playPause();
} catch (err) {
if (err.code === "RATE_LIMITED") return; // ignore, the user is mashing
dd.log("warn", "playPause failed", err.code);
}Timeouts: the SDK rejects requests client-side after 15 seconds, except the
dd.dialogs.* pickers, which wait on the user (the host guarantees they
settle: a 1 hour backstop plus force-cancel on edit mode, reload, and
removal).
apiVersion: the bridge contract
Your manifest's apiVersion declares which bridge API the widget was
written against. The host runs everything in the range
[minSupported ..= version]; both numbers ride context.api and are
currently both 1.
- Newer than the host: the manifest is quarantined at scan ("requires a newer dashboard") and the widget never loads.
- Older than
minSupported: the widget stays listed, but its instances render a "needs an update" tile instead of mounting, and every bridge call would failGONE.
Deprecation, then removal
API surface is never removed silently:
- A method (or a change in its output) is first deprecated. It keeps
working for at least one release; the SDK warns once per method in your
own console (
[dd] <method> is deprecated: <note>), and the current table ridescontext.api.deprecated. - When
apiVersionbumps, deprecated methods move to removed: calls reject withGONEand a message naming the replacement.
Rules of thumb: watch your console during development, treat any [dd]
deprecation warning as a to-do before the next API bump, and feature-detect
with context.api.version when one widget build should span versions.
minAppVersion: the feature floor
minAppVersion and apiVersion gate different things. apiVersion is the
bridge contract. minAppVersion (optional, a plain x.y.z) says "this
widget uses a permission or capability first shipped in DeskDash x.y.z":
- An app older than the floor quarantines the manifest with "needs DeskDash x.y.z or newer" instead of a raw parse error.
- The marketplace shows such a listing with a "Needs app update" chip and a disabled Install button.
Declare it whenever the widget uses something newer than the oldest app you intend to support. Current floors worth knowing:
| Feature | Requires |
|---|---|
the power permission | 0.1.9 |
the folders permission | 0.1.10 |
placeholder and pick on setting fields | 0.1.10 |
the fonts manifest field | 0.2.0 |
The store validators enforce the floors they know about, so a submission missing one fails validation rather than breaking on users.