Back
{"code":"ConnectionRefused","path":"http://localhost/v1/users?queries%5B0%5D=%7B%22method%22%3A%22eq
- 0
- Self Hosted
- Functions
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.I am using bun runtime btw
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)]);
These are the logs:
Executing loginPhoneHandler Checking if the phone number is already registered
It seemts it stuck in this line
TypeScript
const userList = await usersClient.list([Query.equal("phone", phone)]);
How can I fix thix?
Recommended threads
- Local appwrite run functions --user-id n...
Hi, I'm running into an issue when testing Appwrite functions locally with user impersonation. I'm using a self-hosted Appwrite instance and running functions ...
- Selfhosted Github App installation
I've followed this guide: https://appwrite.io/docs/advanced/self-hosting/configuration/version-control to connect GitHub to my self-hosted Appwrite instance (1....
- User ID case sensitivity
I see that through REST (and SDK as well), getting a user is not case sensitive. And even though documentation does not clearly state that it is, the wording "V...