Device
This commit is contained in:
12
backend/modules/monitor_config/exceptions.py
Normal file
12
backend/modules/monitor_config/exceptions.py
Normal file
@@ -0,0 +1,12 @@
|
||||
from common.exceptions.app_exception import NotFoundException
|
||||
|
||||
class MonitorConfigNotFoundException(NotFoundException):
|
||||
"""
|
||||
Exception ném ra khi không tìm thấy cấu hình giám sát (MonitorConfig) của thiết bị.
|
||||
Kế thừa từ NotFoundException để trả về HTTP status 404 cho client.
|
||||
"""
|
||||
def __init__(self, device_id):
|
||||
super().__init__(
|
||||
message=f"Monitor config not found for device with id={device_id}",
|
||||
payload={"device_id": device_id}
|
||||
)
|
||||
Reference in New Issue
Block a user