
It creats the user then throws the error not sure why
const SignUp = async (email,password,name) => {
setLoading(true)
console.log("Entered the sign up process... ")
const promise = await account.create(ID.unique(),email,password,name)
console.log(promise);
if(promise){
console.log("Can login in")
await setDataprofile({
id: promise.$id,
name: promise.name,
address:"",
phonenumber:1,
gender:"",
profileimage:""
})
const response = await axios.post("/api/users/Userprofile",dataprofile)
console.log(response)
}
setLoading(false);
}

Looks like it might be trying to make the create request twice

Can you check the network tab?

Is it possible you have the account.create again somewhere?

nope

all , I am trying to do is once you created the account , I wan the id and name to store it in the db I created

const SignUp = async (email,password,name) => {
setLoading(true)
console.log("Entered the sign up process... ")
const promise = await account.create(ID.unique(),email,password,name)
console.log(promise);
if(promise.$id){
console.log("Can login in")
setDataprofile({
id: promise.$id,
name: promise.name,
address:"",
phonenumber:1,
gender:"",
profileimage:""
})
const response = await axios.post("/api/users/Userprofile",dataprofile)
console.log(response)
}
setLoading(false);
} ```

Can you check the network tab - is there another create request going out?

will it be named ? as account ?

Now , I am rate limited on cloud and lcoal

π’

I donβt know - itβll be a second request out to the /account endpoint

one sec let me share the network


These are the request

So it seems the user profile API is throwing an error. What's the code for that?
Recommended threads
- mcp-for-docs not working properly
I'm experiencing issues integrating the MCP server tool with Cursor IDE. The MCP server connection establishes successfully initially but fails after one minute...
- Creating a relationship with nested obje...
{ "data": { "name": "DiDi", "type": "Software Development", "userJobs": [{ "$id": "68cbf1e2003612fb13ca", "j...
- Realtime integration with SSR auth
Hey, I have a nextjs website with SSR auth, works great. I use a session client for user verification and an admin client with API key. Both is used with node-...
