I am using Supabase as my BaaS, and i have developed and deployed multiple Edge functions. Now i am attempting to develop and debug them locally. However, i am having some issues.
As described here https://supabase.com/docs/guides/functions/local-development i have pulled all the images and ran the supabase stack. Then i served my function. This went smoothly. However, when i try to do any HTTP requests, i get the following error: error sending request for url (http://localhost:8000/users): error trying to connect: tcp connect error: Cannot assign requested address (os error 99)
Anyone who can help with this? I would assume it is a docker-related issue which i dont have much experience with other than trying to expose the ports.
Serving the hello-world function works fine:
% curl --request POST 'http://localhost:54321/functions/v1/hello-world' \ --header 'Authorization: Bearer <anon key>' \ --header 'Content-Type: application/json' \ --data '{ "name":"Functions" }' {"message":"Hello Functions!"}%
SOLVED
Seems like the error shown above appeared because the function did not deploy properly. It showed an error when deploying so it basically were unavailable. Fixing the error resolved the issue.