"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
from orq_ai_sdk import utils
from orq_ai_sdk.types import BaseModel
from typing import Optional


class HonoAPIErrorData(BaseModel):
    message: str
    r"""Error message"""

    code: Optional[str] = None
    r"""HTTP status code"""


class HonoAPIError(Exception):
    data: HonoAPIErrorData

    def __init__(self, data: HonoAPIErrorData):
        self.data = data

    def __str__(self) -> str:
        return utils.marshal_json(self.data, HonoAPIErrorData)
