BonusLockSMith commited on
Commit
f437b1a
·
verified ·
1 Parent(s): 132c782

security: log only exception type (never secrets); generic client errors

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -98,7 +98,7 @@ def api_extract():
98
  try:
99
  return jsonify(data=extract(text, schema))
100
  except Exception as e:
101
- import sys; print("extract error:", repr(e), file=sys.stderr, flush=True)
102
  return jsonify(error="Extraction failed — please try again."), 200
103
 
104
  PAGE = """<!doctype html><html lang="en"><head><meta charset="utf-8">
 
98
  try:
99
  return jsonify(data=extract(text, schema))
100
  except Exception as e:
101
+ import sys; print("extract error:", type(e).__name__, file=sys.stderr, flush=True)
102
  return jsonify(error="Extraction failed — please try again."), 200
103
 
104
  PAGE = """<!doctype html><html lang="en"><head><meta charset="utf-8">