File size: 441 Bytes
44800eb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
class AudioConversionError(Exception):
    """Exception raised for errors in the audio conversion process."""

    pass


class APIError(Exception):
    """Custom exception for API error handling."""

    def __init__(self, message, status_code=None, details=None):
        if details:
            super().__init__(f"{message} - Details: {details}")
        else:
            super().__init__(message)
        self.status_code = status_code