Neutrome SDK reference
    Preparing search index...

    Function appendErrorBlock

    • Appends a structured error to a program.

      Parameters

      • program: Program

        Program to edit.

      • error: ErrorBlockInput

        Error to record. Undefined fields are omitted from the program.

      Returns Program

      A new program; the input is left untouched.

      const failed = appendErrorBlock(createProgram(), {
      source: "provider",
      status: 429,
      message: "rate limited",
      });