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

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

class ErrorMessageData(BaseModel):
    detail: str
    


class ErrorMessage(Exception):
    r"""Unauthorized"""
    data: ErrorMessageData

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

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

