/**
 * Copyright 2022-2025 Theai, Inc. dba Inworld AI
 */
#pragma once
#include "CoreMinimal.h"

#include "InworldRuntimeErrors.generated.h"

/**
 * @enum EInworldRuntimeErrors
 * @brief Enumeration of error codes used throughout the Inworld Runtime system.
 */
UENUM(BlueprintType)
enum class EInworldRuntimeErrors : uint8
{
	/** Operation completed successfully */
	SUCCESS = 0,
	/** Feature or function is not yet implemented */
	NOT_IMPLEMENTED = 1,
	/** Failed to parse JSON data */
	CANT_PARSE_JSON = 2,
	/** Subgraph asset is not valid */
	SUBGRAPH_ASSET_NOTVALID = 3,
	/** Subgraph must have exactly one start and end node */
	SUBGRAPH_ONE_STARTEND = 4,
	/** Local TTS not supported */
	LOCAL_TTS_NOTSUPPORTED = 5
};

/**
 * @class FInworldRuntimeErrors
 * @brief Utility class for handling and converting Inworld Runtime error codes.
 *
 * This struct provides functionality for converting error codes to human-readable
 * messages, helping with error reporting and debugging within the Inworld Runtime system.
 */
struct INWORLDRUNTIME_API FInworldRuntimeErrors
{
	/**
	 * @brief Converts an error code to a human-readable message.
	 * @param Code The error code to convert.
	 * @return A human-readable error message string.
	 */
	static FString GetErrorMessage(EInworldRuntimeErrors Code);
};
