When I run the code, I get the following error message: "An error occurred while creating or updating contact [email]". I've tried generating new private API keys in my HubSpot account but I keep getting the same error.
Can anyone help me figure out what's going wrong and how to fix it?
Hi, @kevinsito👋 Thanks for your question. I don't have the answer, but I have sone questions that may help our community to better understand your issue.
You're printing the response text when there's an error. What's the exact error message you're getting?
The status code for a successful operation would be 200 or 204. You're only checking for 200 which might be the issue. Can you try to print the status code to see if you're getting 204?