接口返回不同错误信息,捕捉系统错误代码

 

    try:
        response = Image.upload(FlaskAdapter(request), "/public/", options)
    except Exception:
        response = {"error": str(sys.exc_info()[1])}
    return json.dumps(response)

 

posted @ 2020-06-07 17:23  我当道士那儿些年  阅读(405)  评论(0编辑  收藏  举报