AS AgentScopeAPI 手册 / API Reference

PermissionDeniedException

public class PermissionDeniedException extends OpenAIException
源码Source io/agentscope/extensions/model/openai/exception/PermissionDeniedException.java:28–33

权限已拒绝异常,表示执行过程中的错误。位于 io.agentscope.extensions.model.openai.exception 包,继承自 OpenAIException。核心成员包括 PermissionDeniedException。

Exception thrown when permission is denied (HTTP 403).

Common causes:

  • API key lacks required permissions

  • Resource access denied

  • Organization restrictions

构造器摘要Constructor Summary

构造器Constructor说明Description
public PermissionDeniedException(String message, String errorCode, String responseBody)
初始化 `PermissionDeniedException` 实例。
Creates a new instance.

构造器详情Constructor Detail

PermissionDeniedException

public PermissionDeniedException(String message, String errorCode, String responseBody)

初始化 PermissionDeniedException 实例。

Creates a new instance.

参数Parameters
名称Name类型Type说明Description
messageString消息(类型 `String`)。The message.
errorCodeString错误 Code(类型 `String`)。The error code.
responseBodyString响应正文(类型 `String`)。The response body.
源码Source io/agentscope/extensions/model/openai/exception/PermissionDeniedException.java:30–32

继承成员Inherited Members

继承自Methods inherited from ModelHttpException
基于官方固定版本源码静态生成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.