Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions dummy.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ def trigger_error():
def get_users():
age = request.args.get('age')
if age:
try:
age = int(age) # This can raise a ValueError
except ValueError:
if age.isdigit():
age = int(age)
else:
logging.error("ERROR: Invalid age format provided.")
return jsonify({"error": "Invalid age format"}), 400

Expand Down