AI Provider Error Constants (enums/Ai1ErrorCodeConstants.java)

ruoyi-vue-pro · yudao-module-ai1-springai/src/main/java/cn/iocoder/yudao/module/ai1/enums/Ai1ErrorCodeConstants.java · java · MIT
ai, lang:java, fw:spring, tag:error-handling

Defines standardized error codes for AI model providers. Use this to manage and categorize exceptions related to model loading, configuration, and API connectivity.

// Source: https://github.com/YunaiV/ruoyi-vue-pro | License: MIT | Copyright 2021 ruoyi-vue-pro
// Provided via justclaw.it.com; keep this notice with the code.
package cn.iocoder.yudao.module.ai1.enums;

import cn.iocoder.yudao.framework.common.exception.ErrorCode;

/**
 * AI1 错误码枚举类
 * <p>
 * ai1 系统,使用 1-041-000-000 段
 */
public interface Ai1ErrorCodeConstants {

    // ========== 供应商 1-041-000-000 ==========
    ErrorCode PROVIDER_NOT_EXISTS = new ErrorCode(1_041_000_000, "供应商不存在");
    ErrorCode PROVIDER_DISABLE = new ErrorCode(1_041_000_001, "供应商({}) 已禁用");
    ErrorCode PROVIDER_HAS_MODEL = new ErrorCode(1_041_000_003, "供应商下存在模型,禁止删除");
    ErrorCode PROVIDER_REMOTE_MODEL_LOAD_FAIL = new ErrorCode(1_041_000_004, "模型拉取失败:请检查供应商地址与 API 密钥");
    ErrorCode PROVIDER_REMOTE_MODEL_EMPTY =

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key