apache/superset · error · DashboardPermalinkGetFailedError

An error occurred while accessing the value.

Error message

An error occurred while accessing the value.

What it means

DashboardPermalinkGetFailedError raised by GetDashboardPermalinkCommand.run when resolving a permalink key fails at the key-value layer. The except clause at get.py:57 catches DashboardNotFoundError, KeyValueCodecDecodeException, KeyValueGetFailedError and KeyValueParseKeyError, and re-raises with the underlying message ('An error occurred while accessing the value.' is the KeyValue error default). It means the permalink key could not be decoded or its stored value could not be read from the KV store.

Source

Thrown at superset/commands/dashboard/permalink/get.py:57

    def __init__(self, key: str):
        self.key = key

    def run(self) -> Optional[DashboardPermalinkValue]:
        self.validate()
        try:
            key = decode_permalink_id(self.key, salt=self.salt)
            value = KeyValueDAO.get_value(self.resource, key, self.codec)
            if value:
                DashboardDAO.get_by_id_or_slug(value["dashboardId"])
                return value
            return None
        except (
            DashboardNotFoundError,
            KeyValueCodecDecodeException,
            KeyValueGetFailedError,
            KeyValueParseKeyError,
        ) as ex:
            raise DashboardPermalinkGetFailedError(message=ex.message) from ex
        except SQLAlchemyError as ex:
            logger.exception("Error running get command")
            raise DashboardPermalinkGetFailedError() from ex

    def validate(self) -> None:
        pass

View on GitHub (pinned to f4587218dd)

Solutions

  1. Generate a new permalink and share that — if the key no longer decodes against the current salt the data is unrecoverable by design.
  2. If SECRET_KEY was rotated recently, either restore the old key or accept that old permalinks are lost (they are not migrated).
  3. Verify the permalink key is complete and URL-safe (no truncation, no stray characters) before calling the API.
  4. Check the KV store health: for the default metadata-DB backend inspect the key_value table; for Redis check connectivity and eviction policy (maxmemory-policy allkeys-lru can evict permalinks).
  5. Reproduce decode directly: decode_permalink_id(key, salt=...) to distinguish a salt mismatch from a store read failure.
Defensive patterns

Strategy: try-catch

Validate before calling

from superset.dashboards.permalink.exceptions import DashboardPermalinkGetFailedError
from superset.key_value.utils import decode_permalink_id

def permalink_key_plausible(key: str) -> bool:
    try:
        decode_permalink_id(key)  # raises on malformed/foreign-salt keys
        return True
    except Exception:
        return False

Try / catch

from superset.dashboards.permalink.exceptions import DashboardPermalinkGetFailedError

try:
    value = GetDashboardPermalinkCommand(key).run()
except DashboardPermalinkGetFailedError:
    # permalink is dead (bad key / rotated SECRET_KEY / purged KV entry)
    value = None  # fall back to the dashboard's default state

Prevention

When it happens

Trigger: GET /api/v1/dashboard/permalink/<key> where <key> is malformed, truncated, or was signed with a different salt (e.g. SECRET_KEY / PERMALINK_SALT changed between create and get); the KV entry expired or was purged (expiring permalink entries); the KV backend (metadata DB table key_value or Redis) rejected the read (KeyValueGetFailedError).

Common situations: Rotating SECRET_KEY on an existing deployment invalidates all stored permalinks (decode_permalink_id uses a SECRET_KEY-derived salt); copying a permalink URL with the key clipped; flushing Redis if a Redis KV backend was configured; version upgrades that changed permalink entry TTLs.

Related errors


AI-assisted analysis of apache/superset@f4587218dd (2026-08-14). Data as JSON: /api/errors/273a674c1098962c. Report an issue: GitHub.