Coverage for src/hush_hush/_generated/errors.py: 50%

6 statements  

« prev     ^ index     » next       coverage.py v7.16.0, created at 2026-10-16 16:01 +0000

1# Code generated by openapi-python-client from hush-hush/api/openapi.yaml; DO NOT EDIT. 

2 

3"""Contains shared errors types that can be raised from API functions""" 

4 

5 

6class UnexpectedStatus(Exception): 

7 """Raised by api functions when the response status an undocumented status and Client.raise_on_unexpected_status is True""" 

8 

9 def __init__(self, status_code: int, content: bytes): 

10 self.status_code = status_code 

11 self.content = content 

12 

13 super().__init__( 

14 f"Unexpected status code: {status_code}\n\nResponse content:\n{content.decode(errors='ignore')}" 

15 ) 

16 

17 

18__all__ = ["UnexpectedStatus"]