Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help: Getting failed Promise response #5569

Closed
kunxl-gg opened this issue May 22, 2023 · 3 comments
Closed

Help: Getting failed Promise response #5569

kunxl-gg opened this issue May 22, 2023 · 3 comments

Comments

@kunxl-gg
Copy link

I am making a request to the appwrite backend using the code given below

  const client = new Client();
  client.setEndpoint('https://cloud.appwrite.io/v1').setProject('[Project_id]')
  const account = new Account(client);
  

  async function createAccount(){
    const response = await account.create(  
      ID.unique(),
      '[email protected]',
      "1234567890",
      "Rahul Tiwari"
    )
    console.log(response)  
  }

I am getting the following error:
image

@kunxl-gg
Copy link
Author

Could you please help me resolve this

@haramishra
Copy link

You need to add 'localhost' to your hostname in the console.

To add 'localhost' to your hostname in the console, follow these steps:

  • Go to the integration settings.
  • Scroll down to the integration section.
  • In the integration section, select the platform for which you want to add the hostname.
  • Update the hostname field with 'localhost' or '*'.

@kunxl-gg
Copy link
Author

You need to add 'localhost' to your hostname in the console.

To add 'localhost' to your hostname in the console, follow these steps:

  • Go to the integration settings.
  • Scroll down to the integration section.
  • In the integration section, select the platform for which you want to add the hostname.
  • Update the hostname field with 'localhost' or '*'.

I think I had done that. I'll still crosscheck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants