403Webshell
Server IP : 185.208.173.17  /  Your IP : 87.236.161.98
Web Server : Microsoft-IIS/10.0
System : Windows NT SRV8576125506 10.0 build 26100 (Windows Server 2016) AMD64
User : IUSR ( 0)
PHP Version : 7.4.13
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /Program Files/MySQL/MySQL Shell 8.0/lib/Python3.13/Lib/site-packages/oci/addons/adk/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /Program Files/MySQL/MySQL Shell 8.0/lib/Python3.13/Lib/site-packages/oci/addons/adk/agent_error.py
# coding: utf-8
# Copyright (c) 2016, 2026, Oracle and/or its affiliates.  All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.

from oci.response import Response


class AgentException(Exception):
    """Base exception class for OCI Generative AI ADK errors"""

    def __init__(self, message: str = "", response: Response | None = None):
        self.message = message
        self.response = response

        if response is not None:
            self.status_code = response.status
            self.data = response.data
            self.headers = response.headers
        else:
            self.status_code = None
            self.data = None
            self.headers = None

    def __str__(self):
        if self.response is not None:
            return f"{self.message}. Status code: {self.status_code}. Response data: {self.data}. Response headers: {self.headers}"  # noqa: E501
        else:
            return f"{self.message}"


class AgentError(AgentException):
    """Exception for OCI Agent service errors"""


class UserError(AgentException):
    """Exception for user errors"""

Youez - 2016 - github.com/yon3zu
LinuXploit