DSatishchandra commited on
Commit
efee040
·
verified ·
1 Parent(s): f84fa4d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -93,6 +93,7 @@ def create_salesforce_record(name, email, phone_number):
93
  print(f"Record created successfully with ID: {customer_login['id']}")
94
  return customer_login
95
  else:
 
96
  print(f"Record creation failed. Full response: {customer_login}")
97
  return {"error": f"Record creation failed. Full response: {customer_login}"}
98
  except Exception as e:
@@ -101,6 +102,7 @@ def create_salesforce_record(name, email, phone_number):
101
  print(f"Error creating Salesforce record: {error_message}")
102
  return {"error": f"Failed to create record in Salesforce: {error_message}"}
103
 
 
104
  # Correct the indentation here
105
  @app.route("/submit", methods=["POST"])
106
  def submit():
 
93
  print(f"Record created successfully with ID: {customer_login['id']}")
94
  return customer_login
95
  else:
96
+ # Log detailed information if the record creation failed
97
  print(f"Record creation failed. Full response: {customer_login}")
98
  return {"error": f"Record creation failed. Full response: {customer_login}"}
99
  except Exception as e:
 
102
  print(f"Error creating Salesforce record: {error_message}")
103
  return {"error": f"Failed to create record in Salesforce: {error_message}"}
104
 
105
+
106
  # Correct the indentation here
107
  @app.route("/submit", methods=["POST"])
108
  def submit():