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

from __future__ import annotations
from skylight_sdk import utils
from skylight_sdk.types import BaseModel


class ErrorResponseData(BaseModel):
    detail: str
    r"""Error message describing what went wrong"""


class ErrorResponse(Exception):
    data: ErrorResponseData

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

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