mirror of
https://github.com/langgenius/dify.git
synced 2026-06-07 16:40:27 +08:00
d573fc0e65
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
18 lines
433 B
Python
18 lines
433 B
Python
from typing import Any
|
|
|
|
from werkzeug.exceptions import HTTPException
|
|
|
|
|
|
class BaseHTTPException(HTTPException):
|
|
error_code: str = "unknown"
|
|
data: dict[str, Any] | None = None
|
|
|
|
def __init__(self, description=None, response=None):
|
|
super().__init__(description, response)
|
|
|
|
self.data = {
|
|
"code": self.error_code,
|
|
"message": self.description,
|
|
"status": self.code,
|
|
}
|