pai
    Preparing search index...

    Function handleError

    • Prints an error to stderr as one line of JSON, {"error":{...}}, and returns the exit code: 2 for a key the API rejected (401 or 403), the CliError's own code, or 1 for anything else.

      Parameters

      • err: unknown
      • stderr: (s: string) => void = ...

      Returns number