file_table_reader/services/upload_file/upload_exceptions.py

10 lines
324 B
Python
Raw Permalink Normal View History

2025-11-17 03:53:15 +00:00
class PDFReadError(Exception):
"""Exception khusus untuk kesalahan saat membaca file PDF."""
def __init__(self, message: str, code: int = 400):
super().__init__(message)
self.message = message
self.code = code
def to_dict(self):
return {"error": self.message, "code": self.code}