Neutrome SDK reference
    Preparing search index...

    Function getFirstErrorBlock

    • Reads the first error carried by a program.

      Parameters

      • program: Program

        Program to read.

      Returns ErrorBlock | undefined

      The error, or undefined when the program carries none.

      const error = getFirstErrorBlock(response);
      if (error) throw new Error(error.message ?? error.source);