Coverage for src/nats_contrib/micro/client/errors.py: 100%

5 statements  

« prev     ^ index     » next       coverage.py v7.4.3, created at 2024-02-27 05:11 +0100

1class ServiceError(Exception): 

2 """Raised when a service error is received.""" 

3 

4 def __init__(self, code: int, description: str) -> None: 

5 super().__init__(f"Service error {code}: {description}") 

6 self.code = code 

7 self.description = description