Skip to content

CodexRequestError

Sub classes

Name Children Inherits
ParseError
codexed.exceptions
JSON-RPC parse error (-32700).
    InvalidRequestError
    codexed.exceptions
    JSON-RPC invalid request (-32600).
      MethodNotFoundError
      codexed.exceptions
      JSON-RPC method not found (-32601).
        InvalidParamsError
        codexed.exceptions
        JSON-RPC invalid params (-32602).
          InternalRpcError
          codexed.exceptions
          JSON-RPC internal error (-32603).
            ServerBusyError
            codexed.exceptions
            Server is overloaded / unavailable and caller should retry.

            Base classes

            Name Children Inherits
            CodexError
            codexed.exceptions
            Base exception for Codex adapter errors.

            ⋔ Inheritance diagram

            graph TD
              1566774381["exceptions.CodexRequestError"]
              3985423535["exceptions.CodexError"]
              1615621424["builtins.Exception"]
              3224121899["builtins.BaseException"]
              2751680898["builtins.object"]
              3985423535 --> 1566774381
              1615621424 --> 3985423535
              3224121899 --> 1615621424
              2751680898 --> 3224121899

            🛈 DocStrings

            Bases: CodexError

            Error from a Codex app-server request (JSON-RPC error response).

            Source code in src/codexed/exceptions.py
            class CodexRequestError(CodexError):
                """Error from a Codex app-server request (JSON-RPC error response)."""
            
                def __init__(self, code: int, message: str, data: dict[str, Any] | None = None) -> None:
                    super().__init__(message)
                    self.code = code
                    self.message = message
                    self.data = data or {}
            
                def __str__(self) -> str:
                    if self.data:
                        return f"[{self.code}] {self.message}: {self.data}"
                    return f"[{self.code}] {self.message}"
            

            :fa-brands-github: Show source on GitHub