Embedding

Errors

The SDK surfaces all failures through the onError callback. Handle them — and learn the codes — so a misconfigured embed never silently breaks.

Listening for errors

js
Playgent.init({
  containerId: "playgent-host",
  game: "sudoku",
  mode: "daily",
  onError: ({ code, message, recoverable }) => {
    if (recoverable) {
      // The SDK shows a Retry button. You may want to log the attempt.
    } else {
      Sentry.captureMessage(`Playgent ${code}: ${message}`);
    }
  },
});

Codes you'll see most

CodeMeaningFix
invalid_gameMissing or malformed game.Provide a valid game ID like sudoku.
unknown_gameGame ID isn't in the catalog.Check spelling against the Hub catalog.
invalid_modemode isn't one of pinned, daily, random.Pick one of the three runtime modes.
unsupported_modeThis game doesn't support that mode (e.g. seeded game with daily).Switch to a supported mode.
invalid_content_refPinned mode without a content value.Provide a pub_… ID.
publication_fetch_failedThe publication isn't published or doesn't exist.Verify the pub_… ID is published.
channel_fetch_failedChannel doesn't exist for that language.Verify the cha_… ID and language.
channel_emptyDaily channel has no scheduled puzzle for today.Use a different channel or different mode.
game_load_failedIframe failed to load (network, CSP, etc.).Check your CSP and origin allowlist.

Recoverable vs. fatal

recoverable: true means the SDK already shows a Retry button to the user — typically network issues or transient fetch failures. You don't need to retry yourself; just log and move on.

recoverable: false means the embed is misconfigured. The user sees a static error screen. Catch these in dev and CI.

Full reference

Every error code, including triggers and HTTP-equivalent context, is on the SDK Error codes page.