Sanity Library Reference Docs
    Preparing search index...

    Function getAgentErrorMessage

    • Extracts a user-facing error message from an agent API error. Returns the message sent by the API when available, otherwise a generic fallback.

      Parameters

      • error: unknown

      Returns string