Archived
删除历史版本, 初始化仓库
This commit is contained in:
37 files changed
+1773
No files matched your search
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env python3
|
||||
# -- coding:utf-8 --
|
||||
# @Author: markushammered@gmail.com
|
||||
# @Development Tool: PyCharm
|
||||
# @Create Time: 2022/3/25
|
||||
# @File Name: errors.py
|
||||
|
||||
from . import main
|
||||
from flask import jsonify
|
||||
|
||||
|
||||
@main.app_errorhandler(404)
|
||||
def page_not_found(e):
|
||||
return jsonify(
|
||||
{
|
||||
'code': 404,
|
||||
'msg': '页面未找到',
|
||||
'data': None
|
||||
}
|
||||
), 404
|
||||
|
||||
|
||||
@main.app_errorhandler(500)
|
||||
def internal_server_error(e):
|
||||
return jsonify(
|
||||
{
|
||||
'code': 500,
|
||||
'msg': '服务器内部错误',
|
||||
'data': None
|
||||
}
|
||||
), 500
|
||||
Reference in New Issue
Block a user