Files
pay-service/src/application/domain/exceptions/application_exceptions.py
2026-04-22 09:57:24 +03:00

19 lines
452 B
Python

from __future__ import annotations
from typing import Mapping
class ApplicationException(Exception):
def __init__(
self,
status_code: int,
message: str,
headers: Mapping[str, str] | None = None,
):
super().__init__(message)
self.status_code = status_code
self.message = message
self.headers = headers
def __str__(self):
return f"{self.status_code}: {self.message}"