sdk/python/shroomdk/errors/server_error.py
2022-07-22 14:57:26 -04:00

14 lines
361 B
Python

from typing import Union
from .base_error import BaseError
class ServerError(BaseError):
"""
Base class for all server errors.
"""
def __init__(self, status_code: int, message: Union[str, None]):
self.message = f"unexpected server error occured with status code: {status_code}, msg: {message}"
super().__init__(self.message)