pzx-web-api/app/api/v1/exception/api.py

22 lines
420 B
Python
Raw Normal View History

from apiflask import HTTPError
class ImageUploadError(HTTPError):
status_code = 500
message = '上传图片失败'
class UserInfoError(HTTPError):
status_code = 500
message = '设置用户信息失败'
2023-08-16 17:13:52 +08:00
2023-09-15 18:00:17 +08:00
class DietCreationError(HTTPError):
status_code = 500
message = '添加食物记录失败'
2023-08-16 17:13:52 +08:00
class ImageNotFound(HTTPError):
status_code = 404
message = '获取图片链接失败'