cli icon indicating copy to clipboard operation
cli copied to clipboard

Local studio should show me my deployed edge functions

Open CareTiger opened this issue 1 year ago • 0 comments

Is your feature request related to a problem? Please describe. I am frustrated that I can't compare the local vs staging vs prod deployed edge functions.

Describe the solution you'd like have a link to show edge functions locally even if they are still being tested.

Additional context I got an error testing an edge function in staging. the function works fine locally. here is the error.

{'data': b'502: Bad Gateway (UNCAUGHT_EXCEPTION)\n\nThe deployment failed while serving the request.',
 'error': None}

there is nothing in the remote logs. and local logs still dont work for me because of logflare/gcloud settings gap.

$ supabase --version
1.68.6
$ docker --version
Docker version 24.0.2, build cb74dfc
windows 11

here is the function code

# create the supabase client with the anon key
supabaseClient: Client = create_client(url, anon_key)
# create registration function
func = supabaseClient.functions()

async def test_func():
    resp = await func.invoke("registration",
                             invoke_options={
                                    'method': 'POST',
                                    'body':{
                                        'full_name': 'ikiolp',
                                        'email': '[email protected]',
                                    }
                                }
                            )
    return resp

task = asyncio.create_task(test_func())
await task

CareTiger avatar Jun 26 '23 11:06 CareTiger