AS AgentScopeAPI 手册 / API Reference

DifyAuthException

public class DifyAuthException extends DifyApiException
源码Source io/agentscope/core/rag/integration/dify/exception/DifyAuthException.java:40–77

Dify 认证异常,表示执行过程中的错误。位于 io.agentscope.core.rag.integration.dify.exception 包,继承自 DifyApiException。核心成员包括 toString、DifyAuthException。

Exception thrown when Dify API authentication fails.

This exception is a specialized version of DifyApiException for authentication-related errors. It typically indicates:

  • Invalid API key

  • Expired API key

  • Missing API key

  • Insufficient permissions for the requested operation

Example usage:

`try {
difyClient.retrieve(...);
} catch (DifyAuthException e) {
log.error("Authentication failed: {}", e.getMessage());
// Check your API key configuration
}
`

构造器摘要Constructor Summary

构造器Constructor说明Description
public DifyAuthException(String message)
创建新的DifyAuthException 使用消息。
Creates a new DifyAuthException with a message.
public DifyAuthException(String message, Throwable cause)
初始化 `DifyAuthException` 实例。
Creates a new DifyAuthException with a message and cause.
public DifyAuthException(int statusCode, String message)
初始化 `DifyAuthException` 实例。
Creates a new DifyAuthException with custom status code.

方法摘要Method Summary

方法Method说明Description
public String toString()
返回 `toString` 结果。
Returns the to string.

构造器详情Constructor Detail

DifyAuthException

public DifyAuthException(String message)

创建新的DifyAuthException 使用消息。

Creates a new DifyAuthException with a message.

参数Parameters
名称Name类型Type说明Description
messageString错误消息。the error message
源码Source io/agentscope/core/rag/integration/dify/exception/DifyAuthException.java:47–49

DifyAuthException

public DifyAuthException(String message, Throwable cause)

初始化 DifyAuthException 实例。

Creates a new DifyAuthException with a message and cause.

参数Parameters
名称Name类型Type说明Description
messageString错误消息。the error message
causeThrowablecause(类型 `Throwable`)。the underlying cause
源码Source io/agentscope/core/rag/integration/dify/exception/DifyAuthException.java:57–59

DifyAuthException

public DifyAuthException(int statusCode, String message)

初始化 DifyAuthException 实例。

Creates a new DifyAuthException with custom status code.

参数Parameters
名称Name类型Type说明Description
statusCodeint状态 Code(类型 `int`)。the HTTP status code (401 or 403)
messageString错误消息。the error message
源码Source io/agentscope/core/rag/integration/dify/exception/DifyAuthException.java:69–71

方法详情Method Detail

toString

public String toString()

返回 toString 结果。

Returns the to string.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/rag/integration/dify/exception/DifyAuthException.java:73–76

继承成员Inherited Members

基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.