Skip to content

Commit da68b78

Browse files
author
Vianpyro
committed
Refactor error handling in add_recipe endpoint to remove traceback logging
1 parent ed54bcc commit da68b78

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

routes/recipe.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,5 @@ def add_recipe():
124124

125125
return jsonify({"message": "Recipe added successfully"}), 201
126126

127-
except Exception as e:
128-
import traceback
129-
130-
traceback.print_exc()
127+
except Exception:
131128
return jsonify({"error": "An internal error has occurred!"}), 500

0 commit comments

Comments
 (0)