mirror of
				https://github.com/langgenius/dify.git
				synced 2025-10-31 10:53:02 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			18 lines
		
	
	
		
			431 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			431 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| from typing import Optional
 | |
| 
 | |
| from werkzeug.exceptions import HTTPException
 | |
| 
 | |
| 
 | |
| class BaseHTTPException(HTTPException):
 | |
|     error_code: str = "unknown"
 | |
|     data: Optional[dict] = None
 | |
| 
 | |
|     def __init__(self, description=None, response=None):
 | |
|         super().__init__(description, response)
 | |
| 
 | |
|         self.data = {
 | |
|             "code": self.error_code,
 | |
|             "message": self.description,
 | |
|             "status": self.code,
 | |
|         }
 | 
