web_demo / sami_client /errors.py
Shengyi Zhou
refactor: separate demo API from SAMI client
ff0c106
Raw History Blame Contribute Delete
341 Bytes
from __future__ import annotations
class SAMIError(Exception):
"""A normalized failure returned by or raised for the SAMI API."""
def __init__(self, status_code: int, code: str, message: str) -> None:
super().__init__(message)
self.status_code = status_code
self.code = code
self.message = message