Back

{"code":"ConnectionRefused","path":"http://localhost/v1/users?queries%5B0%5D=%7B%22method%22%3A%22eq

  • 0
  • Self Hosted
  • Functions
Mosh Ontong
3 Jul, 2024, 13:52

This error is from my functions

TL;DR
Error code "ConnectionRefused" when trying to access localhost. The error stems from code at the line `const userList = await usersClient.list([Query.equal("phone", phone)]);`. The error occurred in the function `loginPhoneHandler`. Resolution: Ensure that the connection details are correct and that the server is running properly.
Mosh Ontong
3 Jul, 2024, 13:55

I am using bun runtime btw

Mosh Ontong
3 Jul, 2024, 13:56
TypeScript

    const usersClient = new Users(client);
    const databases = new Databases(client);

    let { phone, id }: LoginPhoneData = req.body;

    log("Checking if the phone number is already registered");

    const userList = await usersClient.list([Query.equal("phone", phone)]);
Mosh Ontong
3 Jul, 2024, 13:57

These are the logs:

Executing loginPhoneHandler Checking if the phone number is already registered

Mosh Ontong
3 Jul, 2024, 13:57

It seemts it stuck in this line

TypeScript
 const userList = await usersClient.list([Query.equal("phone", phone)]);
Mosh Ontong
3 Jul, 2024, 13:57

How can I fix thix?

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more