问题描述
我将以ConvertApi为例。如果我将其集成到我的python代码中,例如:
try:
#Calling API here
except Exception as e:
print(e)
并获取响应代码
{
"Code": 4013,"Message": "User credentials not set,secret or token must be passed."
}
有没有办法我可以打印自己的文本。据我所知,我可以做到
try:
#Calling API here
except:
print('It didn\'t work')
但是如果我收到400 Bad Request
的消息,而我想说“检查您的连接”,500 Internal Server Error
的消息“文件转换失败”,以此类推。任何指导将不胜感激。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)