AppBaseException (qwenpaw/exceptions.py)

QwenPaw · src/qwenpaw/exceptions.py · python · Apache-2.0
ai

Module exposing: AppBaseException, ConfigurationException, AgentConfigConflictError, AgentRuntimeErrorException, ModelExecutionException, ModelTimeoutException, UnauthorizedModelAccessException, ModelQuotaExceededException

# Source: https://github.com/agentscope-ai/QwenPaw | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
# Provided via justclaw.it.com; keep this notice with the code.
# -*- coding: utf-8 -*-
"""QwenPaw exception definitions and converters."""

from typing import Any, Dict, Optional


# ==================== Base Exceptions ====================


class AppBaseException(Exception):
    """Top-level base for QwenPaw application exceptions.

    Accepts ``error_code`` / ``detail`` / arbitrary kwargs so that
    handlers can build structured HTTP error responses.
    """

    def __init__(
        self,
        message: str | None = None,
        **kwargs: Any,
    ) -> None:
        self.message = message
        self.error_code = kwargs.pop("error_code

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

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

Get a free API key