"""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 ServerErrorResponseData(BaseModel):
    detail: str
    r"""Detailed error message from the server"""


class ServerErrorResponse(Exception):
    data: ServerErrorResponseData

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

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