Member Junction
    Preparing search index...

    Function ReadSystemOneErrorMessage

    • The vendor's message from a decision API's error body, or an empty string when it has none. It reads, in order:

      • detail as FastAPI sends it: a string, or a list of { msg } (joined with ; );
      • detail as an object { error_type, message } (SubQ), as error_type: message;
      • error.message, as OpenAI-style APIs send it (Perplexity, Inception, llama.cpp);
      • error as a plain string.

      A detail that carries no message (a blank string, a list with no non-empty msg, an object with no non-empty message) falls through to error, so it never hides the vendor's real message.

      Parameters

      • bodyText: string

        The response body as text; anything that is not a JSON object gives an empty string.

      Returns string