Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -187,6 +187,8 @@ def letterhead():
|
|
187 |
try:
|
188 |
# Log the data instead of saving it to a file
|
189 |
logging.info("Received Data: %s", data)
|
|
|
|
|
190 |
|
191 |
|
192 |
# Extract data
|
@@ -243,8 +245,8 @@ def letterhead():
|
|
243 |
return jsonify({ "message": message }), 200
|
244 |
except ValueError as e:
|
245 |
return jsonify({"error": str(e)}), 404
|
246 |
-
except Exception as e:
|
247 |
-
|
248 |
|
249 |
if __name__ == '__main__':
|
250 |
app.run(debug=True)
|
|
|
187 |
try:
|
188 |
# Log the data instead of saving it to a file
|
189 |
logging.info("Received Data: %s", data)
|
190 |
+
except Exception as e:
|
191 |
+
return jsonify({"error": str(e)}), 500
|
192 |
|
193 |
|
194 |
# Extract data
|
|
|
245 |
return jsonify({ "message": message }), 200
|
246 |
except ValueError as e:
|
247 |
return jsonify({"error": str(e)}), 404
|
248 |
+
# except Exception as e:
|
249 |
+
# return jsonify({"error": str(e)}), 500
|
250 |
|
251 |
if __name__ == '__main__':
|
252 |
app.run(debug=True)
|