chore(api): expose real 500 error stack trace for scrap scan API
This commit is contained in:
BIN
deploy.tar.gz
BIN
deploy.tar.gz
Binary file not shown.
@ -50,8 +50,9 @@ def scan_barcode():
|
||||
else:
|
||||
return jsonify({'code': 404, 'msg': '未找到对应的库存记录'}), 404
|
||||
except Exception as e:
|
||||
traceback.print_exc()
|
||||
return jsonify({'code': 500, 'msg': f'扫描查询出错: {str(e)}'}), 500
|
||||
import traceback
|
||||
traceback.print_exc() # 强制在控制台打印真实错误堆栈
|
||||
return jsonify({"code": 500, "msg": f"服务器内部错误详情: {str(e)}"}), 500
|
||||
|
||||
|
||||
# --------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user