Rest API - HTTP Status Codes
Find the bug in this REST API code that should return 409 Conflict on duplicate resource creation:
def create_user(user):
if user_exists(user['email']):
return {"error": "User already exists"}, 400
else:
save_user(user)
return {"message": "User created"}, 201
