OpenClaw SDK
    Preparing search index...

    Function isErrorResponse

    • Type guard to check if a frame is an error response.

      Parameters

      • frame: unknown

        Value to check

      Returns frame is ResponseFrame

      True if the value is an error ResponseFrame

      const data = JSON.parse(someJson);
      if (isErrorResponse(data)) {
      console.log("Error:", data.error); // TypeScript knows it's an error
      }