Skip to content

Commit

Permalink
增加错误代码
Browse files Browse the repository at this point in the history
  • Loading branch information
kristina579 committed Jun 13, 2017
1 parent 9df5bda commit 5e804cd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions web_translate_baidu_api/vsearch4web.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ def do_search() -> 'html':
translate_result='客户端IP,非法检查您填写的IP地址是否正确,可修改您填写的服务器IP地址'
elif '54004' in data['error_code']:
translate_result='账户余额不足,请前往管理控制台为账户充值'
elif '102' in data['error_code']:
translate_result='不支持的语言类型'
else:
translate_result='未能在已知的错误代码中,发现问题'
else:
Expand Down

0 comments on commit 5e804cd

Please sign in to comment.