Files
ITShowPlatform/utils/get_error_msg.py
T
shineahead bbd4691646 work
2022-05-05 22:57:41 +08:00

16 lines
426 B
Python

def get_error_msg(code="20000"):
error_set = {
"20000": "成功",
"50000": "意外错误",
"50403": "Forbidden",
"40000": "请求方法错误",
"40001": "JSON解析错误",
"40002": "非法字符",
"40003": "弹幕过长",
"40004": "输入不能为空",
"40005": "返回评论数为0",
"40006": "",
}
return error_set.get(str(code))